wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

G9-Introduction to Python Programming

Total questions: 25

Worksheet time: 15mins

Name
Class
Date
1.

What is Python?

a)

A programming language

b)

A type of computer

c)

A game

d)

A website

2.

What does IDE stand for?

a)

Integrated Development Environment

b)

Interactive Development Language

c)

Integrated Data Language

d)

Interactive Development Environment

3.

What does the print command do?

a)

Prints information onto the screen

b)

Prints to a printer

c)

Saves a file

d)

Prints results of operations onto the screen

4.

What is the purpose of the input command?

a)

To wait for user input

b)

To print output

c)

To save a file

d)

To run a program

5.

What does BIDMAS stand for?

a)

Brackets, Indices, Division, Multiplication, Addition, Subtraction

b)

Brackets, Indices, Division, Multiplication, Addition, Subtraction

c)

Brackets, Indices, Division, Multiplication, Addition, Subtraction

d)

Brackets, Indices, Division, Multiplication, Addition, Subtraction

6.

What does the double-slash // do in Python?

a)

Rounding-down division

b)

Normal division

c)

Multiplication

d)

Addition

7.

What does the percentage sign - % - do in Python?

a)

Rounding-down division

b)

Normal division

c)

gives the remainder of a division between two values.

d)

Addition

8.

What is the result of 3**2

a)

6

b)

9

c)

27

d)

18

9.

What is the purpose of variables in Python?

a)

To store data

b)

To print output

c)

To run programs

d)

To create functions

10.

What is the output of print('Hello', name, ', how are you today?') - Where name="Monty"

a)

Hello Monty, how are you today?

b)

Hello, how are you today?

c)

Hello Monty

d)

Hello, name

11.

Is the result of 9 + 4 * 2

a)

26

b)

28

c)

39

d)

17

12.

Is the result of (9 + 4) * 2

a)

26

b)

28

c)

39

d)

17

13.

Is the result of the code :

print ("Hello World)

a)

Hello World

b)

"Hello world

c)

"Hello World"

d)

Syntax error

14.

a)

Syntax Error

b)

Run-Time Error

c)

Logical Error

d)

semantic errors

15.

To avoid the Run time errors ;

a)

Test your code thoroughly

b)

Use error - handling techniques

c)

Use clear descriptive variable

d)

Run the compiler often to get early feed back

16.

is the type of errors that happens when the computer is not able to make the conversion reliably

a)

Syntax error

b)

Compilation error

c)

Run- time error

d)

semantic errors

e)

logical error

17.

A data type that stores alphanumeric information

(a)  

18.

A data type that stores Whole numbers

(a)  

19.

A data type that can only be one of two values : True or False

a)

String

b)

Boolean

c)

Float

d)

integer

20.

The suitable data type to store the value 9.76

a)

Integer

b)

Float

c)

Boolean

d)

String

21.

Used to add annotation to the code :

a)

%

b)

*

c)

&

d)

#

22.

Adding strings together is called --------- & ----------- is used in it

a)

Concatenation - +

b)

Annotation - %

c)

Division - **

d)

Joining - #

23.

Is the comparison operator in python

a)

=

b)

==

c)

= *

d)

===

24.

Is the result of the code:

print( 9 > 4)

(a)  

25.

Is the not equal operator in python

a)

not =

b)

!=

c)

x=

d)

not equal