Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python 146- While Loops

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

which loop can execute a block of code until a condition becomes true

a)

For loop

b)

while Loop

c)

repeat loop

2.

Choose the relevant options that applies while loop

a)

debugging the code until its error free

b)

sleeping until your alarm rings

c)

watching tv from 12:00 pm to 3:00 pm

3.

Correct sequence of while loop

a)

Condition, Action, initialisation, Increment/decrement

b)

initialisation, Condition, Action, Increment/decrement

c)

initialisation, Condition, Increment/decrement, Action

4.

Examples of fibonacci

a)
b)
c)
5.

makes the button component visible on the root window

a)

btn.show()

b)

btn.pack()

c)

btn.unpack()

6.

fibonacci series is

a)

sequence of number where each number is the sum of its preceding two numbers

b)

sequence of number where each number is the sum of itself

c)

sequence of number where each number is the square of its preceding two numbers

7.

str()

a)

converts any type of value to string data type

b)

converts string to integer

8.

Fixed number of fibonacci series

a)

0 and 1

b)

1 and 2

c)

1 and 1

9.

Creates a root window for the application using tkinter

a)

geometry()

b)

Tk()

c)

mainloop()

10.

Choose the correct fibonacci series

a)

0 1 2 3 5 8 13

b)

0 1 1 2 3 5 8

c)

1 2 3 5 8 15 23