Create a Python script named tryme3.py . Write a function in this file called ni
ID: 3796666 • Letter: C
Question
Create a Python script named tryme3.py .
Write a function in this file called nine_lines that uses a function called three_lines to print nine blank lines.
Now add a function named clear_screen that prints out twenty-five blank lines. The last line of your program should call the function to clear_screen .
The function three_lines and new_line are defined below so that you can see a nested function call.
def new_line():
print()
def three_lines():
new_line()
new_line()
new_line()
It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read.
Explanation / Answer
//Python Program
def new_line():
print()
def three_lines():
new_line()
new_line()
new_line()
def nine_lines():
print("**Lets start Calling Three Lines()**")
print three_lines()
def Three_lines():
print("****1st Line is Printing***")
print("****2nd Line is Printing***")
print("****3rd Line is Printing***")
print("****4th Line is Printing***")
print("****5th Line is Printing***")
print("****6th Line is Printing***")
print("****7th Line is Printing***")
print("****8th Line is Printing***")
print("****9th Line is Printing***")
print Three_lines()
def clear_screen():
print(" Now Clearing functionality can be performed by the clear_screen()")
print("------ 1st Line------")
print("------ 2nd Line------")
print("------ 3rd Line------")
print("------ 4th Line------")
print("------ 5th Line------")
print("------ 6th Line------")
print("------ 7th Line------")
print("------ 8th Line------")
print("------ 9th Line------")
print("------ 10th Line------")
print("------ 11th Line------")
print("------ 12th Line------")
print("------ 13th Line------")
print("------ 14th Line------")
print("------ 15th Line------")
print("------ 16th Line------")
print("------ 17th Line------")
print("------ 18th Line------")
print("------ 19th Line------")
print("------ 20th Line------")
print("------ 21st Line------")
print("------ 22nd Line------")
print("------ 23rd Line------")
print("------ 24th Line------")
print("------ 25th Line------")
print clear_screen()