wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Unit 1 Quiz

Total questions: 20

Worksheet time: 12mins

Name
Class
Date
1.

Complete The code to take address as Input from the user?

address=_

(a)  

2.

At which line will this code stop execution?

salary

a)

2nd

b)

3rd

c)

1st

d)

5th

3.

The computer will get stuck at line 2. why?

a)

Line 2 contains the first error

b)

The error in line 3 is anticipated

4.

Produce a line of code to store a movie Title in a variable named movie

1)= , 2)"Avatar"

3)movie , 4)Avatar

a)

123

b)

421

c)

312

d)

432

5.

Fill The blank

a)

Campaign

b)

CAMPAIGN

c)

campaign

6.

What will be the output?

a)

True

b)

False

c)

show a error

7.

What will be the output?

a)

84

b)

Show error

c)

12

8.

What will be the output here?

a)

will give output as major or minor depending on the user's input

b)

show error

9.

What will be the output

a)

50000

b)

True

c)

50000

True

d)

Show Error

10.

In what data type will the variables store the value if given input?

a)

String

int

b)

String

String

c)

int

String

d)

int

int

11.

What will be the code output?

a)

The sum of the numbers

b)

The concatenation of two strings

12.

What would be the output?

a)

"720"

b)

360360

c)

720

d)

Show error

13.

Answer the Given question

a)

The line starts with a Hash symbol #

b)

There is an equal sign=

c)

The value is surrounded by double quotation marks

d)

The value is surrounded by any quotation marks

14.

Which of the following operator has the highest precedence?

a)

not

b)

&

c)

*

d)

+

15.

What will be the output?

a)

50

b)

Show error

c)

0

d)

None

16.

Output?

(a)  

17.

Output?

(a)  

18.

What is missing in the following line of code?

a)

[ ]

b)

( )

c)

{ }

19.

What is the output of print(2%6)

(a)  

20.

What will be the output?

y=10

x= y += 2

print(x)

a)

12

b)

10

c)

Syntax Error