Answer to Question #183186 in Python for FORTUNE AIDOO

Question #183186

REQUIREMENTS

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?
  • Does the assignment demonstrate the use of nested function calls?
1
Expert's answer
2021-04-19T21:06:07-0400
def new_line(place_holder =''):
    print(place_holder,end ='\n')


def three_lines(place_holder =''):
    print(place_holder,end ='\n')
    print(place_holder,end ='\n')
    print(place_holder,end ='\n')


def nine_lines(place_holder =''):
    three_lines(place_holder = place_holder)
    three_lines(place_holder = place_holder)
    three_lines(place_holder = place_holder)
    
    
def clear_screen(place_holder =''):
    nine_lines(place_holder = place_holder)
    nine_lines(place_holder = place_holder)
    three_lines(place_holder = place_holder)
    three_lines(place_holder = place_holder)
    new_line(place_holder = place_holder)
    
print('New line')
new_line()
print('Printing tree lines with placeholder"-"')
three_lines('-')
print('Printing nine lines with placeholder"."')
nine_lines('.')
print('Clear screen')
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