Questions with Verified Answers
Focuses on describing a sequence of steps to perform a task - CORRECT ANSWER
What are the traits of Imperative/procedural programming?
Organize code around objects, which encapsulate data and behavior. - CORRECT
ANSWER What are the traits of Object-Oriented Programming (OOP)?
emphasizes the use of functions and immutable data for computation. - CORRECT
ANSWER What are the traits of Functional Programming?
describes what the program should accomplish without specifying how to achieve
it. - CORRECT ANSWER What are the traits of Declarative Programming?
Reacts to events and user actions, triggering corresponding functions. - CORRECT
ANSWER What are the traits of Event-Driven Programming?
defines a set of logical conditions and lets the system deduce solutions. - CORRECT
ANSWER What are the traits of Logic Programming?
The set of rules that dictate the combinations of symbols and keywords that form
valid Python programs - CORRECT ANSWER What does Python syntax refer to?
To define blocks of code - CORRECT ANSWER What is the purpose of indentation
in Python?
, To temporarily disable lines or blocks of code - CORRECT ANSWER Why might a
programmer use comments for 'Preventing Execution'?
To define the structure and hierarchy of the code - CORRECT ANSWER What is the
primary use of whitespace in Python?
Indentation - CORRECT ANSWER What does Python use to define the scope of
control flow statements and structures like functions and classes?
To capture user input and store it as a string - CORRECT ANSWER What is the
purpose of the input() function in Python?
It enhances output formatting by embedding variables in strings. (although 'f'
strings are easier to read) - CORRECT ANSWER What does the format() method do
in Python?
To provide a text editor designed for Python, offering features like syntax
highlighting, code completion, and indentation. - CORRECT ANSWER What is the
purpose of the Code Editor in a Python IDE?
outputs text or variables to the console - CORRECT ANSWER What does this built
in Python function do?: print()
reads user input from the console - CORRECT ANSWER What does this built in
Python function do?: input()