wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Pythonintro

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is Python?

a)

An Operating System

b)

A network

c)

A programming language

d)

A browser

2.

Python was created by

a)

Linus Torvalds

b)

Dennis Ritchie

c)

Guido van Rossum

d)

Steve Jobs

3.

What will be the output?

name = 'Dave'

print (name)

a)

name

b)

Dave

c)

'Dave'

d)

print('name')

4.

When you have an error in your code what is the term to summarize finding and fixing that error?

a)

Error checking

b)

Debugging

c)

Error finder

d)

Syntax finder

5.

How do you display text?

a)

input

b)

print

c)

output

d)

variable

6.

What is syntax?

a)

Syntax is the word used to describe a variable

b)

Syntax is the rules of the programming language

c)

This is used to read information

d)

It is used to output information

7.

What will the following code do:

print("What is your name?")

a)

Allow you to type in your name

b)

Display the words 'What is your name?' on the screen

c)

Allow you to enter information

d)

Print your name to the screen

8.

The following code is used to create a variable and store a value. Why will it NOT work?

my number = 36

a)

The variable can't store a number

b)

A variable name cannot have any spaces

c)

There variable name can't be called my number

d)

The equals symbol should be at the beginning of the line

9.

The following variable contains some data. What is the data type that is being stored.

hobby = "football"

a)

Integer

b)

Float

c)

String (Text)

d)

Boolean

10.

What will the output be from the following code?

print("Hello world!")

a)

SyntaxError

b)

Hello world!

c)

"Hello world!"

d)

print(Hello world!)

11.

What will the output be from the following code?

Print("Hello world!")

a)

NameError

b)

Hello world!

c)

"Hello world"

d)

Print(Hello world!)

12.

What will the output be from the following code?

print(Hello world!)

a)

Hello world!

b)

Hello world

c)

SyntaxError

d)

print(Hello world!)

13.

What is a variable?

a)

A box(memory location) where you store values

b)

Data type

c)

a type of graphics

d)

a type of memory

14.

What will be the output?

x = float("3")

print(x)

a)

"3"

b)

3

c)

3.0

d)

float

15.

What will be the output?

x = int(1j)

print(x)

a)

1

b)

1j

c)

type error

d)

print(1j)