Question: Assignment Printing Nine and Twenty Five Lines import os def new_line(): print('.' * 10) def three_lines(): new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line()
Assignment Printing Nine and Twenty Five Lines
import os def new_line(): print('.' * 10) def three_lines(): new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() def twenty_five_lines(): new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() new_line() def nine_lines(): three_lines() print('Printed nine lines') os.system('cls') twenty_five_lines() print('Printed twenty five lines') nine_lines()
Output
.......... .......... .......... .......... .......... .......... .......... .......... .......... Printed nine lines .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... Printed twenty five lines
Question: Does the assignment produce the appropriate output when executed? The output should be recorded in a text file, a Microsoft Word document, or an RTF-formatted document by copying the output from the Python script into the document. The successful script will print out 25 "." lines.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
