wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

2F-1 | Python Quiz #1 | 08.10.2025

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

What does the print() function do in Python?

a)

Takes input from the user

b)

Displays output on the screen

c)

Creates a variable

d)

Stops the program

2.

What type of data does input() return by default?

a)

Integer

b)

Float

c)

String

d)

Boolean

3.

Which of the following is a valid variable name?

a)

2number

b)

first-name

c)

_number

d)

print

4.

What is the output of print(2 + 3 * 4)?

a)

20

b)

24

c)

14

d)

9

5.

Which operator is used for exponentiation (raising to power)?

a)

^

b)

**

c)

//

d)

%

6.

What is printed by print("Hello", "World", sep="-")?

a)

Hello World

b)

Hello-World

c)

Hello, World

d)

Hello - World

7.

What will print("Hi", end="!") display?

a)

Hi

b)

Hi!

c)

Hi !

d)

!Hi

8.

What is the result of print(7 // 3)?

a)

2

b)

2.3

c)

2.0

d)

3

9.

What is the last digit of num = 345?

a)

3

b)

4

c)

5

d)

0

10.

What will int("10") + 5 return?

a)

15

b)

105

c)

"105"

d)

Error

11.

What will be printed by print(10 % 3)?

a)

3

b)

1

c)

0.3

d)

10

12.

What is the output of this code?

a)

5

b)

6

c)

8

d)

9

13.

Which statement correctly removes the last digit from number 678?

a)

678 / 10

b)

678 // 10

c)

678 % 10

d)

int(678)

14.

What is the output of print(5 // 2, 5 % 2)?

a)

2 1

b)

2.5 1

c)

1 2

d)

2 0

15.

What will happen with this code?

a)

It will print “Hello name”

b)

It will print “Hello” followed by the input

c)

It will show an error

d)

It will print “name Hello”

16.

What is the output of this code?

a)

7 5 4

b)

4 5 7

c)

4 7 5

d)

5 4 7

17.

What will print(2 * (3 + 4) ** 2) output?

a)

49

b)

98

c)

14

d)

70

18.

What is the output of this code?

a)

A B C - D

b)

A*B*C-D

c)

A-B-C-D

d)

ABC D

19.

Given n = 123, print all possible 3-digit rearrangements using digits of n. How many different outputs will there be?

a)

3

b)

4

c)

6

d)

9

20.

What is the output of the following code?

a)

17

b)

8

c)

1

d)

7