Answer to Question #330573 in Python for Judith

Question #330573



Submit your Python script file in the posting of your assignment. Your Python script should be either a .txt file or a .py file.




You must execute your script and paste the output produced into a document that you will submit along with your Python script.




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 for your peer assessors. A placeholder can be output such as “Printing nine lines” or “Calling clearScreen()”.




The following items will be used in the grading rubric for this assignment. Make sure that you have addressed each item in your assignment.





Does the assignment implement new_line, three_lines, nine_lines, and clear_screen functions, as well as a main section of the program which calls the functions?





1
Expert's answer
2022-04-22T04:43:48-0400


def new_line():
    print('')


def three_lines():
    new_line()
    new_line()
    new_line()


def nine_lines():
    three_lines()
    three_lines()
    three_lines()


def clear_screen(): # 9 + 9 + 3 + 3 + 1 = 25 lines
    nine_lines()
    nine_lines()
    three_lines()
    three_lines()
    new_line()

print("Printing nine lines")
nine_lines()
print("Calling clearScreen()")
clear_screen()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS