wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Module 2 Section 6 Review

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

What is the definition of the print() function in Python?

a)

A function to output data to the console

b)

A function to read input from the user

c)

A function to perform mathematical calculations

d)

A function to define variables

2.

What is the output

a)

name

b)

Daddy 

c)

hello Daddy

d)

hello name

3.

What is the definition of the input() function in Python?

a)

A function to output data to the console

b)

A function to read a line from input, convert it to a string, and return it

c)

A function to perform mathematical calculations

d)

A function to terminate the program

4.

A prompt string in the context of the input() function in Python is:

a)

A string that is displayed to the user before input is taken

b)

A string that is returned by the input() function

c)

A string that is used to terminate the input() function

d)

A string that is used to format the input

5.

What is meant by program flow in Python?

a)

The sequence in which statements are executed

b)

The way Python handles errors

c)

The method of defining functions

d)

The process of importing modules

6.

The concatenation (+) operator in Python is used to:

a)

Add two numbers

b)

Combine two strings

c)

Multiply two numbers

d)

Divide two numbers

7.

What is the output

a)

y + x

b)

x + y

c)

3

d)

4

8.

What is the replication (*) operator in Python?

a)

A way to repeat strings

b)

A method to copy objects

c)

An operator to multiply numbers

d)

A function to replicate lists

9.

What is meant by execution time limit in programming?

a)

The maximum time allowed for a program to run

b)

The time taken to write a program

c)

The time taken to compile a program

d)

The time taken to debug a program

10.

What is the output

a)

y + x

b)

12

c)

3

d)

4