Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PYTHON 1

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

What plays vital role in python programming?

a)

indentation

b)

statements

c)

control

d)

structure

2.

________ is the short form of " else if " statement

a)

nested if

b)

el if

c)

else

d)

if

3.

Which line of code produces an error?

a)

" one"+ " 2"

b)

3+4

c)

"7"+'8'

d)

'5'+ 6

4.

x =10

if (x>0):

print(x)

the output is ?

a)

100

b)

1

c)

0

d)

10

5.

In programming, what is iteration?

a)

The order in which instructions are carried out

b)

The repetition of steps within a program

c)

A decision point in a program

d)

Testing a program to make sure it works

6.

FOR loops are

a)

not part of programming

b)

loops which run an unknown number of times

c)

loops which run for a specific number of times

d)

the same as if statements

7.

A condition is

a)

a statement that is either True or False

b)

a list

c)

a string

d)

an integer

8.

A loop repeated if the condition is true / false

a)

If...else

b)

While loop

c)

Repeat loop

d)

For loop

9.

What is an advantage of a linear search?

a)

it is half interval search

b)

It only works with ordered lists

c)

It is a simple algorithm

d)

It is very quick

10.

Which of the following is not a sorting algorithm?

a)

merge sort

b)

Long Sort

c)

Bubble Sort

d)

Insertion Sort