Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Basics

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Python uses

a)

Blocks

b)

Braces

c)

Indentation

d)

Parentheses

2.

Pyhton uses which of the following as translator?

a)

Interpreter

b)

Compiler

c)

Both

d)

Assembler

3.

In which language is the Python programming created?

a)

C

b)

C++

c)

Pyhton

d)

All of the above

4.

When a string does not fit in single line, one can use the following quotes for multiple line string?

a)

Single Quotes

b)

Double Quotes

c)

Triple Quotes

d)

Quadruple

5.

a=True; b=True; c=False

if a or b and c:

print('True')

else:

print('False')

a)

False

b)

True

c)

False or True

d)

No Output

6.

The output -12%5 is

a)

-3

b)

-2

c)

3

d)

2

7.

a=500;b=300

print(a*bool(a//b) + b*bool(b//a))

will print?

a)

b

b)

a

c)

500

d)

300

8.

2 ** 2** 3

a)

256

b)

64

c)

12

d)

18

9.

Which of the following is not a keyword in Python

a)

True

b)

eval

c)

nonlocal

d)

as

10.

Select all which is/are true about identifiers.

a)

An identifier must begin with an alphabet

b)

An identifier must begin with a negative integer

c)

An identifier begins with _ (underscore)

d)

An identifier begins with an alphabet followed by number or alphabet