wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python -Variables

Total questions: 10

Worksheet time: 50secs

Name
Class
Date
1.

In Python, the script mode programs can be stored with an extension ------

a)

.pyt

b)

.py

c)

.pyh

d)

.pyn

2.

>>> indicates that

a)

Source program can be created and stored

b)

IDLE is working in script mode

c)

IDLE is working in interactive mode

d)

It will not display the results immediately

3.

Which character is used to give comments in python program?

a)

&

b)

@

c)

&

d)

#

4.

Which function is used to accept data as input at run time?

a)

output()

b)

print()

c)

int()

d)

input()

5.

Which one of the following is not a keyword?

a)

yield

b)

function

c)

global

d)

class

6.

The value of (100%10)*5 is

a)

10

b)

0

c)

500

d)

5

7.

If a=55 and b=3, find a//b

a)

18.0

b)

18.33

c)

18

d)

18.32

8.

If x=23,y=51, find the value of x<y and y!=x ?

a)

True

b)

False

c)

1

d)

0

9.

Choose the correct pair

a)

Octal literal - Ob1010

b)

Hexadecimal literal - 0100

c)

Complex literal - 3+5.6j

d)

Binary literal Oo310

10.

Press ----- key to execute python script

a)

F1

b)

F2

c)

F7

d)

F5