wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python PRIMM Recap L1/L2

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

What will be the output of the following Python code? ```python print("Hello, World!") ```

a)

Hello, World!

b)

"Hello, World!"

c)

Hello World

d)

"Hello World"

2.

Which of the following is the correct way to concatenate the strings "Good" and "Morning" in Python?

a)

"Good" + "Morning"

b)

"Good" & "Morning"

c)

"Good" "Morning"

d)

"Good".concat("Morning")

3.

What will be the result of the following operation in Python: 5+35 + 3 ?

a)

53

b)

8

c)

15

d)

35

4.

If you want to print the result of 7×67 \times 6 using the print function, which of the following is correct?

a)

print(7 * 6)

b)

print("7 * 6")

c)

print(7 x 6)

d)

print("7 x 6")

5.

What will be the output of the following code? ```python print("The sum of 2 and 3 is", 2 + 3) ```

a)

The sum of 2 and 3 is 5

b)

The sum of 2 and 3 is 23

c)

The sum of 2 and 3 is 2 + 3

d)

The sum of 2 and 3 is

6.

Which of the following will correctly print the string "Python is fun"?

a)

print("Python is fun")

b)

print(Python is fun)

c)

print('Python is fun')

d)

Both A and C

7.

What will be the result of the following operation: 10410 - 4 ?

a)

6

b)

14

c)

104

d)

40

8.

How can you print the result of 9÷39 \div 3 in Python?

a)

print(9 / 3)

b)

print(9 // 3)

c)

print(9 ÷ 3)

d)

print("9 / 3")

9.

What will be the output of the following code? ```python print("I have", 2, "apples and", 3, "oranges.") ```

a)

I have 2 apples and 3 oranges.

b)

I have 2apples and 3oranges.

c)

I have 2, apples and 3, oranges.

d)

I have 2 apples and 3 oranges

10.

Which of the following expressions will correctly concatenate the strings "Python" and "3.9"?

a)

"Python" + "3.9"

b)

"Python" & "3.9"

c)

"Python" "3.9"

d)

"Python".concat("3.9")

11.

What will be the result of the following operation: 15÷215 \div 2 in Python using integer division?

a)

7.5

b)

7

c)

8

d)

15