
Python Object-Oriented Programming Pg 94-98Quiz
Quiz
•
Computers
•
10th Grade
•
Medium
Ahmed Shams
Used 11+ times
FREE Resource
Enhance your content in a minute
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an object in Python?
A variable
An instance of a class
A blueprint for creating classes
A keyword
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create an object of a class in Python?
By using the class name followed by parentheses
By importing the class from a module
By using the new keyword followed by the class name
By declaring a variable as an instance of the class type
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the __init__ method in a class in Python?
To initialize instance variables of a class object
To define class methods
To create objects
To import modules
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the output that will be printed by the following Python program: class Rose: def __init__(self, name, color): self.name = name self.color = color rose = Rose("Red Rose", "Red") print(rose.name)
Red Rose
Rose
Red
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the output that will be printed by the following Python program: class Rose: def __init__(self, name, color): self.name = name self.color = color def smell(self): print(self.name) rose = Rose("Red Rose", "Red") rose.smell()
Red Rose
Fragrant!
Red
Rose
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the output that will be printed by the following Python program: class Flower: def __init__(self, name, color, fragrance): self.name = name self.color = color self.fragrance = fragrance flower = Flower("Rose", "Red", True) if flower.fragrance: print("This flower has a fragrance.") else: print("This flower does not have a fragrance.")
This flower has a fragrance.
Red
This flower does not have a fragrance.
Rose
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a higher-order function?
A function that takes one or more functions as arguments
A function that only operates on numbers
A function that returns another function as a result
A function that can only be used once
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
20 questions
Google SketchUp Tool
Quiz
•
KG - University
19 questions
Bill Gates
Quiz
•
6th - 12th Grade
20 questions
Phishing quiz
Quiz
•
1st - 12th Grade
15 questions
DIT Excel 2016 Review
Quiz
•
8th - 12th Grade
22 questions
Steve Jobs
Quiz
•
6th - 12th Grade
22 questions
1.2.4 Data Storage - OCR
Quiz
•
9th - 10th Grade
12 questions
Business Law 2.01
Quiz
•
9th - 12th Grade
15 questions
Unbound Report Quiz
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
10 questions
Halloween Trivia Challenge
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
