wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PYTHON QUIZ 1 (BASICS)

Total questions: 25

Worksheet time: 27mins

Name
Class
Date
1.

What Symbol do you use to create a Variable?

a)

+

b)

-

c)

=

d)

" "

2.

What is a Variable?

a)

A storage area for values

b)

A method of adding numbers together

c)

Displaying text on the screen

d)

Saving your work

3.

An integer is what?

a)

Text

b)

Decimal

c)

Whole Number

d)

True/False

4.

A Float is what?

a)

Text

b)

Decimal

c)

Whole Number

d)

True/False

5.

A Boolean is what?

a)

Text

b)

Decimal

c)

Whole Number

d)

True/False

6.

A String is what?

a)

Text

b)

Decimal

c)

Whole Number

d)

True/False

7.

We can use Python to create what..?

a)

Games

b)

Calculators

c)

Booking Systems

d)

Shopping lists

8.

What would be the output?

x = "Dave"

print ("Paul")

a)

Dave

b)

Fred

c)

Paul

d)

Bryan

9.

x = 5

y = 3

print(x + y + 3)

a)

5

b)

3

c)

7

d)

10

10.

What is the following doing?

age = int(Input("What is your age? ")

a)

Asking the user for any answer

b)

Asking the user to input their age

c)

Asking the user for an integer

d)

Asking the user for their name

11.

What is the difference between 5 and 5.0?

a)

No. They're both the same value.

b)

Their different data types and will act different depending on the program.

12.

True or false - Can you add string together?

a)

False

b)

True

13.

What is the output?

First name = "Joe"

Second Name = "Blogs"

print(First name + Second name)

a)

Joe Blogs

b)

Joe + Blogs

c)

First name Second name

d)

Syntax Error

14.

One of the following is correct?

a)

print(James")

b)

print"James"

c)

Print("James")

d)

print ("James")

15.

What is this: 5

a)

String

b)

Boolean

c)

Float

d)

Integar

16.

What is this: True

a)

String

b)

Boolean

c)

Float

d)

Integar

17.

What is this: 174.42

a)

String

b)

Boolean

c)

Float

d)

Integar

18.

What is this: "Table"

a)

String

b)

Boolean

c)

Float

d)

Integar

19.

x = 5

y = 2

print (x*y)

a)

20

b)

10

c)

15

d)

5

20.

x = input("What college do you attend?")

if x = "Riverside College"

print("Correct")

Else:

print("That is wrong")

a)

This code would Error

b)

True

c)

False

21.

What is the output

x = 5

if x == 5

print ("True")

Else:

False

a)

True

b)

False

c)

Error

22.

What is the output

x = 5

if x == 5

print (True")

Else:

False

a)

True

b)

False

c)

Error

23.

What is the output

x = 5

if x == 5

print ("True")

Else:

False

a)

True

b)

False

c)

Error

24.

What is the output

x = 5

if x =! 8

print ("True")

Else:

False

a)

True

b)

False

c)

Error

25.

Programming - What are you struggling with? (If anything). Is there anything you are confused over. Would you like any extra sessions?

4 lines