Question
Must use meaningful variable names and have comments that describe what is happening in your script. Comments may describe the assignment of a value to
Must use meaningful variable names and have comments that describe what is happening in your script. Comments may describe the assignment of a value to a variable, a computation and the assignment of the result to a variable, or the display of the result.
Start a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then theclear_screenfunction.
Thefunction three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting "blank" lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
def new_line():
print('.')
def three_lines():
new_line()
new_line()
new_line()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started