D522 PYTHON FOR IT AUTOMATION PA
ASSESSMENT SCRIPT WITH ACCURATE
ANSWERS
◉ What are the traits of Object-Oriented Programming (OOP)?
Answer: Organize code around objects, which encapsulate data and
behavior.
◉ What are the traits of Functional Programming?
Answer: emphasizes the use of functions and immutable data for
computation.
◉ What are the traits of Declarative Programming?
Answer: describes what the program should accomplish without
specifying how to achieve it.
◉ What are the traits of Event-Driven Programming?
Answer: Reacts to events and user actions, triggering corresponding
functions.
◉ What are the traits of Logic Programming?
, Answer: defines a set of logical conditions and lets the system
deduce solutions.
◉ What does Python syntax refer to?
Answer: The set of rules that dictate the combinations of symbols
and keywords that form valid Python programs
◉ What is the purpose of indentation in Python?
Answer: To define blocks of code
◉ Why might a programmer use comments for 'Preventing
Execution'?
Answer: To temporarily disable lines or blocks of code
◉ What is the primary use of whitespace in Python?
Answer: To define the structure and hierarchy of the code
◉ What does Python use to define the scope of control flow
statements and structures like functions and classes?
Answer: Indentation
◉ What is the purpose of the input() function in Python?
Answer: To capture user input and store it as a string
ASSESSMENT SCRIPT WITH ACCURATE
ANSWERS
◉ What are the traits of Object-Oriented Programming (OOP)?
Answer: Organize code around objects, which encapsulate data and
behavior.
◉ What are the traits of Functional Programming?
Answer: emphasizes the use of functions and immutable data for
computation.
◉ What are the traits of Declarative Programming?
Answer: describes what the program should accomplish without
specifying how to achieve it.
◉ What are the traits of Event-Driven Programming?
Answer: Reacts to events and user actions, triggering corresponding
functions.
◉ What are the traits of Logic Programming?
, Answer: defines a set of logical conditions and lets the system
deduce solutions.
◉ What does Python syntax refer to?
Answer: The set of rules that dictate the combinations of symbols
and keywords that form valid Python programs
◉ What is the purpose of indentation in Python?
Answer: To define blocks of code
◉ Why might a programmer use comments for 'Preventing
Execution'?
Answer: To temporarily disable lines or blocks of code
◉ What is the primary use of whitespace in Python?
Answer: To define the structure and hierarchy of the code
◉ What does Python use to define the scope of control flow
statements and structures like functions and classes?
Answer: Indentation
◉ What is the purpose of the input() function in Python?
Answer: To capture user input and store it as a string