Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Introduction to Python Programming Quiz 9E

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.

What is an algorithm?

a)

A hardware component

b)

A type of programming language

c)

A set of precise instructions

d)

A software application

2.

What is required to execute a Python program?

a)

A text editor

b)

A compiler

c)

A Python interpreter

d)

A web browser

3.

What happens if a program has syntax errors?

a)

It produces incorrect output

b)

It cannot be run and executed

c)

It runs slower

d)

It requires more memory

4.

What is the purpose of the print function in Python?

a)

To execute algorithms

b)

To display text or values

c)

To handle errors

d)

To create variables

5.

What does the input function do?

a)

Executes a program

b)

Receives keyboard input from the user

c)

Displays a message

d)

Assigns a value to a variable

6.

What is a variable in programming?

a)

A fixed value

b)

A name for a value

c)

A programming error

d)

A type of function

7.

What type of value does the variable 'user' hold in the example?

a)

Boolean

b)

Integer

c)

String

d)

List

8.

What is the output of the code 'print("Hello", user)' if user = "student"?

a)

Hello

b)

Hello student

c)

Hello user

d)

Claude

9.

What is the correct way to write a 'Hello world' program in Python?

a)

print("Hello world!")

b)

print('Hello world!')

c)

print(Hello world!)

d)

print(Hello world)

10.

what is the output for this code
email ="Email"
print("Your email is ",email)

a)
Your email is Email
b)
Your email is Email!
c)
Your email is 'Email'
d)
Your email is Email Address
11.

What is the purpose of using quotation marks in Python?

a)

To indicate a string value

b)

To define a variable

c)

To comment code

d)

To create a function

12.

What does the code 'user = input()' do?

a)

Creates a new variable

b)

Displays a message

c)

Assigns a value to user

d)

Executes a function

13.

What is the output of 'print(film, "is my favourite too!")' if film = "Inception"?

a)

is my favourite too!

b)

Inception is my favourite too!

c)

Inception

d)

film is my favourite too!