wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Series

Total questions: 15

Worksheet time: 3mins

Name
Class
Date
1.

What is Python?

a)

Python is a popular programming language. It was created by Guido van Rossum, and released in 1991

b)

Python is a popular programming language. It was created by Guido van Rossum, and released in 1994

c)

Python is a popular programming language. It was created by Guido van Rossum, and released in 1993

d)

Python is a popular programming language. It was created by Guido van Rossum, and released in 1992

2.

What can Python do?

a)

Python can't be used on a server to create web applications

b)

Python can be used on a server to create web applications

c)

Python can be used on at server to create web applications

d)

Python can be used on a server to created web applications

3.

Why Python?

a)

Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).

b)

Python a simple syntax similar to the English language

c)

Python has syntax that allows developers to write programs with fewer lines than some programming languages

d)

Python on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick

4.

What is a correct syntax to output "Hello World" in Python?

a)

echo("hello world");

b)

echo "hello world"

c)

p("hello world");

d)

print("hello world");

5.

How do you insert COMMENTS in Python code?

a)

/*This is a comment*/

b)

#This is a comment

c)

#//This is a comment

d)

//This is a comment

6.

Python is an interpreted programming language, this means that as a developer you write Python

a)

(.py)

b)

(.pY)

c)

(.PY)

d)

(.Py)

7.

–To check if you have python installed on a Windows PC, search in the start bar for Python or run the following on the Command Line

a)

(cmd.exe):

b)

cmd.exe

c)

(cmd.exe);

d)

(cmd.exe).

8.

Which one is NOT a legal variable name?

a)

my_var

b)

_myvar

c)

Myvar

d)

my-var

9.

How do you create a variable with the numeric value 5?

a)

x = 5

b)

both the other answer are correct

c)

x = int(5)

d)

x = int(5);

10.

What is the correct file extension for Python files?

a)

.pyth

b)

.pt

c)

.py

d)

.pyt

11.

How do you create a variable with the floating number 2.8?

a)

x = 2.8

b)

x = float(2.8)

c)

Both the other answers are correct

12.

Variables are containers for storing data..?

a)

values

b)

value

c)

values;

13.

There may be times ........ want to specify a type on to a variable

a)

when you

b)

that you

c)

like that

d)

is

14.

Variables of numeric types are created when you assign a value to them:

a)

x = 1

b)

y = 2/8

c)

z = 1J

d)

z = 1/J

15.

Int, or integer, is a whole number, positive or negative, without decimals, of unlimited length.

a)

z = --3255522

b)

x = 1

c)

y = -35656222554887711

d)

print(type(x))