wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computing: Introduction to Python Lesson One

Total questions: 103

Worksheet time: 52mins

Name
Class
Date
1.

Programming is:

a)

A way to cook food

b)

A method to create computer software

c)

A type of sport

d)

A musical instrument

2.

Which of the following is a programming language?

a)

Python

b)

HTML

c)

Microsoft Word

d)

Google

3.

Python language is:

a)

A type of snake

b)

A programming language

c)

A car brand

d)

A musical instrument

4.

Which of the following are valid Python functions or syntax?

a)

print(), for loop

b)

echo(), select statement

c)

System.out.println(), while (true)

d)

cout <<, repeat until

5.

IDLE is:

a)

A programming language

b)

An integrated development environment for Python

c)

A type of computer virus

d)

A hardware device

6.

DO NOW CHALLENGE: What is input in Python?

a)

A function to display output

b)

A function to get user input

c)

A variable type

d)

A loop statement

7.

DO NOW CHALLENGE: What is 'print' in Python?

a)

A function to display output

b)

A variable

c)

A loop

d)

A data type

8.

What is the Python environment called where you can write and execute code interactively?

a)

IDLE

b)

Notepad

c)

Photoshop

d)

Excel

9.

Which Python function is used to display a string in the console?

a)

print

b)

show

c)

display

d)

echo

10.

Which Python function is used to get input from the user?

a)

input

b)

get()

c)

scan()

d)

read()

11.

What is a variable in Python used for?

a)

Used to store values

b)

To create functions

c)

To display output

d)

To define loops

12.

What is a function in Python?

a)

Pre-written code that can be used repeatedly

b)

A type of variable used to store numbers

c)

A built-in Python error message

d)

A special kind of loop

13.

What is syntax in Python?

a)

The set of rules that defines the combinations of symbols that are considered to be correctly structured programs in that language.

b)

A type of data structure used to store values.

c)

A built-in function for mathematical operations.

d)

A library for creating graphical user interfaces.

14.

What is a script in Python?

a)

A file containing Python code that can be executed.

b)

A type of hardware device.

c)

A built-in Python function.

d)

A graphical user interface.

15.

What does interactive mean in the context of Python programming?

a)

Working with Python in a way that allows immediate execution and feedback, such as in the Python shell or IDLE.

b)

Writing Python code only in text editors without running it.

c)

Using Python exclusively for web development.

d)

Running Python scripts only as scheduled background tasks.

16.

Which of the following is NOT a data type in Python?

a)

String

b)

Int

c)

Float

d)

Print

17.

A Boolean value in Python can be either ______ or ______.

a)

True or False

b)

Yes or No

c)

1 or 0

d)

On or Off

18.

What is an operator used for in Python?

a)

Used for assigning a value to a variable and for math between two values or variables.

b)

Used only for printing output to the screen.

c)

Used only for creating functions.

d)

Used only for importing modules.

19.

What is an error in Python?

a)

Text displayed in the console when Python detects a mistake. Shows the location (line number) of the mistake.

b)

A type of variable used to store numbers in Python.

c)

A function that prints output to the screen.

d)

A special keyword used to define loops in Python.

20.

What is a statement in Python?

a)

A single line of code that does something. Like a sentence, every statement has a subject and a verb.

b)

A type of variable used to store data.

c)

A function that returns a value.

d)

A special symbol used for comments.

21.

What is a comment in Python used for?

a)

Used to explain what the code does. Not interpreted by Python.

b)

To execute a block of code repeatedly.

c)

To define a function in Python.

d)

To import external libraries.

22.

What is the function in Python that allows for user input?

a)

input

b)

scan

c)

get_input

d)

readline

23.

Which Python function displays a string in the console?

a)

print

b)

show

c)

display

d)

echo

24.

Which Python data type represents a number value with no decimal places?

a)

int

b)

float

c)

str

d)

list

25.

Which Python data type represents a number value that has decimal places?

a)

float

b)

int

c)

str

d)

bool

26.

A Boolean in Python can only be

a)

True

b)

False

27.

In Python, what is used to store values and has a unique name that you choose?

a)

Variable

b)

Function

c)

Loop

d)

Operator

28.

What is used in Python for assigning a value to a variable or for math between two values or variables?

a)

Operator

b)

Function

c)

String

d)

Loop

29.

What do you call pre-written code in Python that can be used repeatedly?

a)

Function

b)

Variable

c)

Loop

d)

String

30.

What is displayed in the console when Python detects a mistake and shows the location (line number) of the mistake?

a)

Error

b)

Warning

c)

Output

d)

Success

31.

What do you call a single line of code in Python that does something, similar to a sentence?

a)

Statement

b)

Paragraph

c)

Function

d)

Block

32.

What is not interpreted by Python and is used to explain what the code does?

a)

Comment

b)

Variable

c)

Function

d)

Loop

33.

In Python, which key concept refers to (data types) and may use quotation marks around a string or decimal points to turn an int into a float?

a)

Value

b)

Function

c)

Loop

d)

Operator

34.

What does 'IDLE' mean in the context of Python programming?

a)

IDLE stands for Integrated Development and Learning Environment, which is an environment for writing and running Python programs.

b)

IDLE is a command used to install Python packages.

c)

IDLE is a type of error that occurs when Python is not running.

d)

IDLE is a library for creating graphical user interfaces in Python.

35.

What is the purpose of the 'print' function in Python?

a)

The 'print' function is used to display output to the screen in Python.

b)

The 'print' function is used to take input from the user in Python.

c)

The 'print' function is used to define a function in Python.

d)

The 'print' function is used to terminate a program in Python.

36.

What is the use of 'input' in Python programming?

a)

The 'input' function is used to get user input in Python programs.

b)

It is used to display output on the screen.

c)

It is used to define a function in Python.

d)

It is used to import external libraries.

37.

What is a 'variable' in Python?

a)

A variable is a named location used to store data in a program.

b)

A variable is a type of loop in Python.

c)

A variable is a built-in function in Python.

d)

A variable is a reserved keyword in Python.

38.

What is a 'function' in Python?

a)

A function is a block of code that performs a specific task and can be reused.

b)

A function is a type of variable that stores numbers only.

c)

A function is a built-in Python library for graphics.

d)

A function is a comment used to describe code.

39.

What does 'syntax' mean in programming?

a)

Syntax refers to the set of rules that defines the structure of a programming language.

b)

Syntax is the process of debugging code.

c)

Syntax is the hardware used to run programs.

d)

Syntax is the output produced by a program.

40.

What is a 'script' in Python?

a)

A script is a file containing Python code that can be executed as a program.

b)

A script is a built-in Python function.

c)

A script is a type of Python variable.

d)

A script is a Python error message.

41.

What does 'interactive' mean in the context of programming?

a)

Interactive means that the program can respond to user input while it is running.

b)

Interactive means the program runs without any user input.

c)

Interactive means the program only displays output and never takes input.

d)

Interactive means the program stops running after one command.

42.

What is Python?

a)

A type of snake

b)

A programming language

c)

A comedy group

d)

A search engine

43.

When was the first release of the Python programming language?

a)

1980

b)

1985

c)

February 20, 1991

d)

2000

44.

Python was named after which comedy group?

a)

The Three Stooges

b)

Monty Python

c)

Saturday Night Live

d)

The Marx Brothers

45.

Python is used by companies such as Yahoo, Google, NASA, and ________.

a)

Facebook

b)

Burger King

c)

Pepsi

d)

Nike

46.

Which of the following is NOT listed as a use of Python?

a)

Shopping comparison site

b)

Computer games

c)

Cooking recipes

d)

Search engine

47.

What is the meaning of the vocabulary word: IDLE?

a)

IDLE is an Integrated Development and Learning Environment for Python.

b)

IDLE is a type of computer virus.

c)

IDLE is a programming language.

d)

IDLE is a hardware device used for networking.

48.

What is the meaning of the vocabulary word: print?

a)

print is a command in Python used to display output.

b)

print is a type of data storage device.

c)

print is a programming language.

d)

print is a mathematical operation.

49.

What is the meaning of the vocabulary word: input?

a)

input is a command in Python used to take user input.

b)

input is a type of loop in Python.

c)

input is a function to print output on the screen.

d)

input is a keyword to define a variable.

50.

What is the meaning of the vocabulary word: variable?

a)

A variable is a storage location identified by a name that holds data in a program.

b)

A variable is a type of computer hardware used for processing data.

c)

A variable is a programming language used to write software.

d)

A variable is a tool used to connect computers to the internet.

51.

What is the meaning of the vocabulary word: function?

a)

A function is a block of code that performs a specific task and can be reused.

b)

A function is a type of variable that stores numbers only.

c)

A function is a tool used to draw shapes in a program.

d)

A function is a comment added to explain code.

52.

What is the meaning of the vocabulary word: syntax?

a)

Syntax refers to the set of rules that defines the structure of a programming language.

b)

Syntax is a type of computer hardware component.

c)

Syntax is a popular programming language.

d)

Syntax is a software used for graphic design.

53.

What is the meaning of the vocabulary word: script?

a)

A script is a file containing Python code that can be executed.

b)

A script is a type of hardware device used in computers.

c)

A script is a graphical user interface for web browsers.

d)

A script is a network protocol for data transfer.

54.

What is the meaning of the vocabulary word: interactive?

a)

Interactive refers to the ability to interact with the program or environment in real time.

b)

Interactive means something that cannot be changed.

c)

Interactive refers to something that is always offline.

d)

Interactive means something that is only for display and cannot be used.

55.

What does IDLE stand for in Python?

a)

Integrated Development Learning Environment

b)

Integrated Development Environment

c)

Interactive Development Language Environment

d)

Integrated Data Learning Environment

56.

Fill in the blank: The window that first appears when you start Python IDLE is called the _______ mode window.

a)

Interactive

b)

Script

c)

Command

d)

Edit

57.

What is the purpose of an Integrated Development Environment (IDE)?

a)

An Integrated Development Environment contains all the tools needed to write, test and run computer programs.

b)

An Integrated Development Environment is used only for compiling hardware circuits.

c)

An Integrated Development Environment is a type of operating system for mobile devices.

d)

An Integrated Development Environment is a database management tool.

58.

What is the meaning of 'IDLE' in the context of Python?

a)

IDLE stands for Integrated Development Environment.

b)

IDLE stands for Interactive Data Language Editor.

c)

IDLE stands for Internal Debugging Language Environment.

d)

IDLE stands for Internet Development Language Editor.

59.

What does 'print' do in Python?

a)

'print' is a function used to display output in Python.

b)

'print' is used to take input from the user in Python.

c)

'print' is a keyword to define a variable in Python.

d)

'print' is used to comment code in Python.

60.

What is an 'input' in Python?

a)

'input' is a function used to take user input in Python.

b)

'input' is a keyword used to define a variable in Python.

c)

'input' is a module for mathematical operations in Python.

d)

'input' is a data type in Python.

61.

What is a 'variable' in Python?

a)

A variable is a storage location identified by a name that holds a value.

b)

A variable is a type of Python function.

c)

A variable is a built-in Python module.

d)

A variable is a special kind of loop in Python.

62.

What is a 'function' in Python?

a)

A function is a block of code that performs a specific task and can be reused.

b)

A function is a type of variable that stores numbers only.

c)

A function is a built-in Python library for data analysis.

d)

A function is a comment used to describe code.

63.

What does 'syntax' mean in Python?

a)

Syntax refers to the set of rules that defines the structure of Python code.

b)

Syntax is the process of executing Python code line by line.

c)

Syntax is a type of variable used in Python programs.

d)

Syntax is the name given to Python's built-in functions.

64.

What is a 'script' in Python?

a)

A script is a file containing Python code that can be executed.

b)

A script is a built-in Python function.

c)

A script is a type of Python variable.

d)

A script is a Python error message.

65.

What does 'interactive' mean in the context of Python IDLE?

a)

Interactive means you can type commands and see results immediately in the Python shell.

b)

Interactive means you can only write code in a text editor and run it later.

c)

Interactive means Python IDLE automatically saves your work every minute.

d)

Interactive means you can only use Python IDLE with an internet connection.

66.

What is the meaning of the term 'IDLE' in Python programming?

a)

IDLE stands for Integrated Development and Learning Environment, which is an environment for writing and running Python programs.

b)

IDLE stands for Internal Data Logging Engine, used for debugging Python code.

c)

IDLE stands for Interactive Data Language Editor, a tool for editing Python scripts.

d)

IDLE stands for Internet Development Language Environment, a web-based Python IDE.

67.

What does the 'print' function do in Python?

a)

The 'print' function outputs text or other data to the screen.

b)

The 'print' function saves data to a file.

c)

The 'print' function reads input from the user.

d)

The 'print' function creates a new variable.

68.

What is the purpose of the 'input' function in Python?

a)

The 'input' function allows the user to enter data into a program.

b)

The 'input' function displays output to the screen.

c)

The 'input' function performs mathematical calculations.

d)

The 'input' function defines a new variable.

69.

What is a 'variable' in Python programming?

a)

A variable is a named location used to store data in a program.

b)

A variable is a type of loop in Python.

c)

A variable is a built-in function in Python.

d)

A variable is a special kind of comment in Python.

70.

What is a 'function' in Python?

a)

A function is a block of code that performs a specific task and can be reused.

b)

A function is a type of variable that stores numbers only.

c)

A function is a built-in Python library for data analysis.

d)

A function is a comment used to explain code.

71.

What does 'syntax' mean in Python programming?

a)

Syntax refers to the set of rules that defines the structure of Python code.

b)

Syntax is the process of executing Python code line by line.

c)

Syntax is a type of variable used in Python.

d)

Syntax is a built-in Python function for mathematical operations.

72.

What is a 'script' in Python?

a)

A script is a file containing Python code that can be executed.

b)

A script is a built-in Python function.

c)

A script is a type of Python variable.

d)

A script is a Python error message.

73.

What does 'interactive' mean in the context of Python programming?

a)

Interactive refers to the mode where you can type and execute Python commands one at a time and see the results immediately.

b)

Interactive refers to writing Python code only in a text editor without seeing results.

c)

Interactive means Python can only be used for web development.

d)

Interactive refers to the ability to run Python code only after compiling it into machine code.

74.

According to the worksheet, what is good practice when starting Python IDLE?

a)

Only use the Interactive mode window

b)

Only use the Script mode window

c)

Have both Interactive and Script mode windows open side-by-side

d)

Do not use any windows

75.

Fill in the blank: On the right is the ______ mode window.

a)

Script

b)

Edit

c)

View

d)

Insert

76.

Which window is labeled as 'Interactive' in the worksheet?

a)

The left window

b)

The right window

77.

Fill in the blank: The program used to write and run Python code is called _______.

a)

IDLE

b)

Notepad

c)

Excel

d)

Photoshop

78.

Fill in the blank: The command used to display output in Python is _______.

a)

print

b)

echo

c)

display

d)

output

79.

Fill in the blank: The function used to get data from the user in Python is _______.

a)

input

b)

scan

c)

fetch

d)

read

80.

Fill in the blank: A named storage location in a program is called a _______.

a)

variable

b)

function

c)

loop

d)

constant

81.

Fill in the blank: A block of code that performs a specific task in Python is called a _______.

a)

function

b)

loop

c)

variable

d)

class

82.

Fill in the blank: The set of rules that defines how a Python program is written is called _______.

a)

syntax

b)

variable

c)

function

d)

loop

83.

Fill in the blank: A file containing Python code is called a _______.

a)

script

b)

notebook

c)

spreadsheet

d)

database

84.

Fill in the blank: The mode where you can type and execute Python commands one at a time is called _______ mode.

a)

interactive

b)

script

c)

batch

d)

compiled

85.

Which of the following is always seen at the start of each new line in Python's interactive mode window?

a)

A) >>>

b)

B) ###

c)

C) ===

d)

D) ***

86.

What is the Interactive mode window in Python used for?

a)

Writing and saving scripts only

b)

Typing and executing commands one at a time

c)

Drawing shapes

d)

Printing documents

87.

What does the acronym IDLE stand for in Python?

a)

Integrated Development and Learning Environment

b)

Interactive Data Language Environment

c)

Integrated Debugging and Learning Engine

d)

Intelligent Development Language Editor

88.

Which of the following is NOT a mode of running Python IDLE?

a)

Interactive

b)

Script

c)

Batch

d)

Both A and B

89.

The Interactive mode in Python IDLE gives immediate feedback to every line of code that is entered.

a)

True

b)

False

90.

Fill in the blank: The ______ mode allows a programmer to type in many lines of Python code and save the code as a single program with a file name.

a)

Script

b)

Interactive

c)

Debug

d)

Command

91.

Match the following vocabulary words with their correct definitions:

a)

IDLE

1.

Integrated Development and Learning Environment

b)

variable

2.

A named storage for data

c)

function

3.

A block of code that performs a task

d)

syntax

4.

The rules for writing code

e)

script

5.

A set of instructions saved as a file

92.

What does the Python command 'print' do?

a)

Prints information onto the screen

b)

Prints information onto a printer

c)

Saves information to a file

d)

Deletes information

93.

Fill in the blank: The first program that most programmers write is often a ________ program.

a)

Hello World

b)

Goodbye Moon

c)

First Steps

d)

Test Run

94.

True or False: The 'print' command in Python prints information onto a printer.

a)

True

b)

False

95.

What is the tradition in computer programming for the first program written by most programmers?

a)

Writing a 'Hello World' program.

b)

Writing a 'Goodbye World' program.

c)

Creating a calculator application.

d)

Designing a website homepage.

96.

What is IDLE in the context of Python programming?

a)

IDLE is an Integrated Development and Learning Environment for Python.

b)

IDLE is a Python library for data analysis.

c)

IDLE is a command-line tool for compiling Python code.

d)

IDLE is a version control system for Python projects.

97.

What does the 'input' function do in Python?

a)

It allows the user to enter data from the keyboard.

b)

It prints output to the screen.

c)

It defines a new function.

d)

It terminates the program.

98.

What is a variable in programming?

a)

A variable is a storage location for data that can change during program execution.

b)

A variable is a fixed value that cannot be changed.

c)

A variable is a type of programming language.

d)

A variable is a function that performs calculations.

99.

What is a function in programming?

a)

A function is a block of code that performs a specific task and can be reused.

b)

A function is a type of variable that stores numbers only.

c)

A function is a graphical representation of data.

d)

A function is a hardware component in a computer.

100.

What does 'syntax' mean in programming?

a)

Syntax refers to the set of rules that defines the combinations of symbols that are considered to be correctly structured programs in a language.

b)

Syntax is the process of debugging errors in a program.

c)

Syntax is the graphical representation of data flow in a program.

d)

Syntax is the hardware component required to run a program.

101.

Python is an example of a:

a)

Text-based programming language

b)

Visual-based programming language

c)

Block-based programming language

d)

Language written in JavaScript

102.

What does term ‘debug’ mean:

a)

looking at the code

b)

a set of instructions

c)

Identify errors and fix them

d)

Making a calculation

103.

What is the word (command) used to display numbers and text on the screen?

a)

Input

b)

Output

c)

Print

d)

Command