How is a method different from a regular function?

120-140

Quiz
•
Information Technology (IT)
•
University
•
Hard
Ілияс Тілепалды
FREE Resource
20 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Method is inside a class
Method takes self as first parameter
Methods run faster
Functions are always static
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
How to add attributes to a class?
Assign in __init__
Use self.attribute = value
Use def keyword
Use import
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is inheritance in Python?
A class deriving from another
Copying a method
Making global variables
Running a loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How to override a parent method?
Redefine it in child class
Use override keyword
Use def twice
Use import
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
What is the difference between a class and an object?
Class is a blueprint
Object is an instance
Class is data
Object defines a class
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is math.floor(0o10)?
8
10
0
9
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is returned by int(math.pow(3, 2))?
6
9
error, third argument required
error, too many arguments
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
2F-1 | Python Quiz | 14/10/2024

Quiz
•
University
22 questions
Unit-8 (QB64) Year-6

Quiz
•
6th Grade - University
15 questions
Quiz Pemrograman Python

Quiz
•
10th Grade - University
15 questions
CMDP2063 Unix and C Programming (Revision)

Quiz
•
University
23 questions
C++ Functions Quiz

Quiz
•
University
25 questions
G9-Introduction to Python Programming

Quiz
•
9th Grade - University
18 questions
Python Library Routines Quiz

Quiz
•
10th Grade - University
20 questions
quiz1B1

Quiz
•
7th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade