
Python Class and Object Quiz

Quiz
•
Other
•
University
•
Medium
EC M
Used 6+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a class in Python?
A datatype
A blueprint for creating objects
A built-in function
A module
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a class in Python?
def
class
object
method
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an object in Python?
A function
An instance of a class
A module
A datatype
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a method in Python?
A function defined inside a class
A variable
A loop
A condition
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create an instance of a class named `Car`?
car = Car()
car = Car
car = new Car()
car = createCar()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `__init__` method do in a class?
It defines a class variable
It initializes the object's attributes
It prints the object
It deletes the object
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a method named `drive` inside a class?
def drive():
def drive(self):
def self.drive():
def method drive():
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
CLIL Methodology Quiz

Quiz
•
12th Grade - University
15 questions
Statistical

Quiz
•
University
20 questions
CASH

Quiz
•
University
15 questions
Science Report 1 - Summary

Quiz
•
University
20 questions
BEED 16 ACTIVITY

Quiz
•
University
20 questions
CPS2213 TEST CLO3

Quiz
•
University
20 questions
Teaching Methods & Strategies

Quiz
•
University
24 questions
Research 1 - Quiz 1

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Other
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University