Docsity

Worksheet for Python Functions ADVANCED FUNCTION DRILLS 2026 GUARANTEED PROGRESS GRADED A+, Exams of Object Oriented Programming

Toggle sidebar
bg1
Worksheet for Python Functions
PREPARATION EXERCISES 2026
QUESTIONS & CORRECT ANSWERS
GRADED A+
โ— Divide and Conquer. Answer: A large task is divided into several
smaller tasks that are easily performed.
โ— Modularized Program. Answer: a program that has been written with
each task in its own functions
โ— Void Functions. Answer: It simply executes the statements it contains
and then terminates
โ— Value-Returning Function. Answer: it executes the statements that it
contains, and then it returns a value back to the statement that called it.
Ex: int and float
โ— Function Header. Answer: the first line of a function. Begins with the
key word def, followed by te name of the function.
โ— Block. Answer: A set of statements that belong together as a group.
pf3

Partial preview of the text

Download Worksheet for Python Functions ADVANCED FUNCTION DRILLS 2026 GUARANTEED PROGRESS GRADED A+ and more Exams Object Oriented Programming in PDF only on Docsity!

Worksheet for Python Functions

PREPARATION EXERCISES 2026

QUESTIONS & CORRECT ANSWERS

GRADED A+

โ— Divide and Conquer. Answer: A large task is divided into several smaller tasks that are easily performed. โ— Modularized Program. Answer: a program that has been written with each task in its own functions โ— Void Functions. Answer: It simply executes the statements it contains and then terminates โ— Value-Returning Function. Answer: it executes the statements that it contains, and then it returns a value back to the statement that called it. Ex: int and float โ— Function Header. Answer: the first line of a function. Begins with the key word def, followed by te name of the function. โ— Block. Answer: A set of statements that belong together as a group.

โ— Message function. Answer: contains a block with two statements. Executing the function will cause these statements to execute. โ— Returns. Answer: When the end of the block is reached, the interpreter jumps back to the part of the program that called the function, and the program resumes execution at that point. โ— Mainline logic. Answer: the overall logic of the program. โ— Flowchart. Answer: A function call is shown with a rectangle that has vertical bars at each side โ— Top-down design. Answer: When the programmer begins by looking at the topmost level of tasks that must be performed and then breaks down those tasks into lower levels of subtasks. โ— Hierarchy Chart. Answer: shows boxes that represent each function in a program โ— Local variable. Answer: created inside a function and can't be accessed by statements that are outside the functions. โ— Variable's scope. Answer: Part of a program in which the variable may be accessed.