Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Short Essay questions: not more than 4 sentences if possible : 1-Frank complains

ID: 3550530 • Letter: S

Question

Short Essay questions:
not more than 4 sentences if possible :

1-Frank complains that defining functions to use in his programs is a lot of extra work. He says he can finish his programs much more quickly if he just writes them using basic operations and control statements. State three reasons why his view is shortsighted.??





2-Describe the processes of top-down design and stepwise refinement.??






3-Explain what happens when the following recursive function is called with the value 4 as an argument:

def example(n):

if n > 0:

print(n)

example(n
Short Essay questions:
not more than 4 sentences if possible :

1-Frank complains that defining functions to use in his programs is a lot of extra work. He says he can finish his programs much more quickly if he just writes them using basic operations and control statements. State three reasons why his view is shortsighted.??





2-Describe the processes of top-down design and stepwise refinement.??






3-Explain what happens when the following recursive function is called with the value 4 as an argument:

def example(n):

if n > 0:

print(n)

example(n

Explanation / Answer

Ans 1. (i) He will have to rewrite his program for different values and test cases.

(ii) It would be difficult to find errors and debug if he writes the entire program in one go.

(iii) He might have to re-use an entire segment of code and deal with redundancy which he could have avoided by using functions.

Ans 2. A top-down design is one in which design begins by specifying complex pieces and then dividing them into successively smaller pieces. The process of developing smaller pieces is called stepwise refinement.

Ans 3. The function would print "4321", but the program will never terminate. The function call example(0), although won't print anything, will call example(-1) and so on..

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote