wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Conditions

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

Which is NOT a data type in Python?

a)

integer

b)

boolean

c)

Word

d)

float

2.

What is the name of the variable in this program?

a)

print

b)

personName

c)

input

d)

Enter your name

3.

Which of the following will allow the user to input a decimal number?

a)

str(input())

b)

float(input())

c)

int(input())

4.

What would the output be for this

code?

a)

17

b)

20

c)

25

d)

13

5.

The "If" Statement is an example of a _________________

a)

Correctional Statement

b)

Competitive Statement

c)

Conditional Statement

d)

Inquisitive Statement

6.

What is a Condition?

a)

Something a User Enters into the Program

b)

A Statement that is either True or False

c)

A Calculation

d)

A Programming Language

7.

What does the following symbol mean?

==

a)

Less than

b)

Greater than

c)

Not Equal to

d)

Equal to

8.

What does the following symbol mean?

<

a)

Less than

b)

Greater than

c)

Not Equal to

d)

Equal to

9.

What does the following symbol mean?

>=

a)

Equal to

b)

Less than or Equal to

c)

Greater than or Equal to

d)

Not Equal to

10.

Is the following statement True or False?


15 > 12

a)

True

b)

False

11.

Is the following statement True or False?


15 == 12

a)

True

b)

False

12.

Which is correct?

a)

A

b)

B

13.

What is the output of this condition?

a)

You have blue eyes

b)

blue

c)

green

d)

You do not have Blue eyes

14.

Fill in the blank to display the output:

"You have more than 1 dog"

a)

number_of_dogs < 1

b)

number_of_dogs == 1

c)

number_of_dogs > 1

15.

What is the difference between

"=" and "=="

in Python

a)

They are the same

b)

"=" allows us to compare two values

"==" allows us to assign values to variables

c)

"==" allows us to compare two values

"=" allows us to assign values to variables

16.

How well have you understood Conditional statements?

a)

Very well

b)

well

c)

Almost

d)

Not well

e)

Help