wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python (coding)

Total questions: 20

Worksheet time: 8mins

Name
Class
Date
1.

WHICH OF THE PRINT CAMMANDS IS CORRECT.

a)

print (hello world)

b)

print (123)

c)

print (_149)

d)

print = hello world

2.

which of them is integer(int)?

a)

10.1

b)

"5"

c)

8

3.

which of them is camel case?

a)

HelloWorld

b)

hello_world

c)

helloWorld

4.

Which of them is snake case

a)

hello_world

b)

HelloWorld

c)

HelloWORLD

5.

what is a variable?

a)

a box(container) in which we store values and information.

b)

something we use to print a block of code

c)

a comment

d)

an error

6.

What symbol is used in python to assign values to a variable?

(a)  

7.

What Python command lets the user enter an answer to a question?

a)

input()

b)

output()

c)

print()

d)

uppercase()

8.

 To repeat a fixed number of times we use

a)

repeat loop

b)

print()

c)

input()

d)

or *for turtle import

9.

The second part of if, that is executed when the condition is false

a)

for turtle import

b)

repeat loop

c)

else

d)

elif

10.

The character that must be at the end of the line for if, while, for etc.

a)

;

b)

'

c)

"

d)

:

11.

What is the correct format to form a comment?

a)

'comment'

b)

:comment:

c)

#comment

d)

!comment!

12.

Data type for a whole number

a)

boolean

b)

string

c)

integer

d)

float

13.

What does the term 'debug' mean?

a)

there is a bug in the computer

b)

fixing and finding errors

c)

a set of instructions

d)

a loop

14.

What will be the output?

name = 'Dave'

print (name)

a)

name

b)

(name)

c)

Dave

d)

dave

15.

x = 5

y = 6

print(x*y)

what will be the answer of the following

a)

11

b)

30

c)

1

d)

0

16.

how does python identify if it is a block of code ?

a)

Begin and end key words

b)

(and)

c)

align/indentation

d)

guessing

17.

Python language was developed in what year?

a)

1998

b)

1995

c)

1991

d)

1199

18.

A line of text that Python won't try to run as code

a)

float

b)

string

c)

integer

d)

comment

19.

python allows the user to put the question while they use the input command

a)

TRUE

b)

FALSE

20.

which programming language are you using

a)

C++

b)

Java

c)

JavaScript

d)

Python