
Python Programming Quiz
Quiz
•
English
•
University
•
Easy
Tâm Dương
Used 2+ times
FREE Resource
133 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which of the following does the Cricket Fan class correctly inherit from the Party Animal class?
from party import Party Animal
class CricketFan(PartyAnimal)
An= PartyAnimal()
CricketFan = PartyAnimal()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, a class is... for a concrete object.
nuisance
instance
blueprint
distraction
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define an initializer method?
def init(title, author):
def init(self, title, author):
def init():
init(self, title, author):
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to indicate the start of a method in a Python class?
def
break
function
continue
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is not true about object-oriented programming?
One of the benefits of object-oriented programming is that it can hide complexity.
A class contains functions as well as the data that is used by those functions.
Constructor methods are required to initialize an object and destructor methods are required to destroy the object when no longer required.
A powerful feature of object-oriented programming is the ability to create a new class by extending an existing class.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? python class Person: def_init__(self, id): self.id =id sam Person(100) sam_dict_['age'] $I=49$ print(sam.age len(sam._dict))
49
50
51
48
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which came first, the instance or the class?
Class
Function
Instance
Method
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
129 questions
TỪ VỰNG NGÀY 31
Quiz
•
University
135 questions
CEPT quiz part-2
Quiz
•
University
138 questions
C123 Kinh tế chính trị
Quiz
•
University
134 questions
friday, 5pm
Quiz
•
University
135 questions
Sastra Inggris
Quiz
•
University
130 questions
Cuestionario de Psicología
Quiz
•
University
130 questions
VOCA TỔNG HỢP PART 4
Quiz
•
University
133 questions
module 11/2
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
