Methods
Classes
Data Types
Variables
Arithmetic Operations
100

 A reusable block of code that performs a specific task.

What is a method (or function)?

100

A blueprint used to create objects.

What is a class?

100

The data type used to store whole numbers.

What is int?

100

A named storage location for data.

What is a variable?

100

The operator used for exponentiation.

 What is **?

200

Which keyword is used to create a method in Python?

What is def?

200

The special method automatically called when an object is created.

What is __init__()?

200

The data type used to store decimal values.

What is float?

200

score = 10

score = 15

print(score)

What is 15?

200

print(20 // 3)

What is 6?

300

What value is returned by a method if no return statement is written?

What is None?

300


class Dog:

    def __init__(self, name):

        self.name = name

What does self.name represent?

What is an instance variable?

300

True and False belong to this data type.

What is bool?

300

x = 5

y = x

x = 8

Value of y.

What is 5?

300

print(25 % 3)

What is 1?

400

def multiply(a, b):

    return a * b

print(multiply(4, 5))

What is 20?

400

class Cat:

    def __init__(self):

        self.age = 2

kitty = Cat()

print(kitty.age)

What is 2?

400
x = "25"

Data type of x.

What is String?
400

a = 23

b = 23.5

c = a + b

What is 46.5?

400

Adding two Strings.

What is concatenation?

500

def mystery(x):

    return x * 2 + 3


print(mystery(4))

What is 11?

500

class Student:

    def __init__(self, grade):

        self.grade = grade


s = Student(95)

print(s.grade)

What is 95?

500

x = 3

y = 4.0

z = x + y

Data type of z.

What is a float?

500

name = "Python"

print(name[2])

What is "t"?

500

print((8 + 4) // 3 * 2)

What is 8?

M
e
n
u