Python is a ____-level, general-purpose programming language known for its clear syntax and readability.
Answer: high
Python source code files always use the ____ extension.
Answer: .py
The ____ function in Python is used to output text or variables to the console.
Answer: print
The default separator between multiple values in the print
function is ____.
Answer: a space (' '
)
To change the ending character of a print
statement, use the ____ parameter.
Answer: end
In Python, the ____ character is used to insert a tab space in the output.
Answer: \t
A ____ error occurs when the Python interpreter finds code that does not conform to the rules of the Python language.
Answer: syntax
In Python, comments that start with the ____ symbol are called single-line comments.
Answer: #
Multi-line comments in Python are enclosed in ____ or ____.
Answer: triple double quotes ("""
), triple single quotes ('''
)
Python uses ____ to define the scope of code blocks, such as loops and conditional statements.
Answer: indentation
The with
statement in Python automatically ____ a file after the block of code is executed.
Answer: closes
The ____ module in Python provides functions to interact with the operating system, such as getcwd()
to get the current working directory.
Answer: os
To print a formatted string in Python, you can use ____.
Answer: f-strings
The ____ parameter in the print
function specifies how to separate multiple values.
Answer: sep
The escape sequence ____ is used to insert a newline character in a string.
Answer: \n
A ____ error occurs while the program is being executed, such as division by zero or file not found.
Answer: run-time
The ____ function is used to write output to a file instead of the console.
Answer: print
In Python, the ____ operator can be used to repeat a string multiple times.
Answer: *
The ____ function in Python is used to open a file for reading or writing.
Answer: open
Indentation in Python is typically done using ____ spaces per level.
Answer: 4