lOMoARcPSD|5493832
CS 1101 Programming Fundamentals Programming Assign
Unit 2
Programming Fundamentals (University of the People)
StuDocu is not sponsored or endorsed by any college or university
Downloaded by sidharth h (sidharthh009@gmail.com)
lOMoARcPSD|5493832
CS 1101 Programming Fundamentals
Script
def new_line(): #printing of one new line
print('.')
def three_lines():#printing of three new lines
new_line()
new_line()
new_line()
def nine_lines():#printing of the nine lines
three_lines()
three_lines()
three_lines()
def clear_screen():
# These are the function’s used to make the above functions get the 25 lines needed when combine
together.
print('Printing 25 lines..')
nine_lines()
nine_lines()
three_lines()
three_lines()
new_line()
# Calling of the functions used to do the program.
print('Printing 9 lines..')
Downloaded by sidharth h (sidharthh009@gmail.com)
lOMoARcPSD|5493832
nine_lines()
clear_screen()
The results are:
# print nine ’.’ lines
Printing 9 lines..
# print 25 ‘.’ lines
Printing 25 lines..
Downloaded by sidharth h (sidharthh009@gmail.com)
lOMoARcPSD|5493832
>>>
Downloaded by sidharth h (sidharthh009@gmail.com)