Exam Ques ons and answers Newest RATED A+
2025/2026 UPDATED
What are the traits of Impera ve/procedural programming? - Ans Focuses on describing a
sequence of steps to perform a task
What are the traits of Object-Oriented Programming (OOP)? - Ans Organize code around
objects, which encapsulate data and behavior.
What are the traits of Func onal Programming? - Ans emphasizes the use of func ons and
immutable data for computa on.
What are the traits of Declara ve Programming? - Ans describes what the program should
accomplish without specifying how to achieve it.
What are the traits of Event-Driven Programming? - Ans Reacts to events and user ac ons,
triggering corresponding func ons.
What are the traits of Logic Programming? - Ans defines a set of logical condi ons and lets
the system deduce solu ons.
What does Python syntax refer to? - Ans The set of rules that dictate the combina ons of
symbols and keywords that form valid Python programs
What is the purpose of indenta on in Python? - Ans To define blocks of code
, Why might a programmer use comments for 'Preven ng Execu on'? - Ans To temporarily
disable lines or blocks of code
What is the primary use of whitespace in Python? - Ans To define the structure and hierarchy
of the code
What does Python use to define the scope of control flow statements and structures like
func ons and classes? - Ans Indenta on
What is the purpose of the input() func on in Python? - Ans To capture user input and store it
as a string
What does the format() method do in Python? - Ans It enhances output forma2ng by
embedding variables in strings. (although 'f' strings are easier to read)
What is the purpose of the Code Editor in a Python IDE? - Ans To provide a text editor
designed for Python, offering features like syntax highligh ng, code comple on, and
indenta on.
What does this built in Python func on do?: print() - Ans outputs text or variables to the
console
What does this built in Python func on do?: input() - Ans reads user input from the console
What does this built in Python func on do?: len() - Ans determines the length of a sequence
(string, list, tuple)
What does this built in Python func on do?: type() - Ans returns the type of an object