Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
718 views

Cs 1101 Programming Fundamentals Programming Assign Unit 2

The document defines functions to print new lines, three lines, and nine lines. It then uses these functions to print 9 lines, and 25 lines by calling the functions and combining them. The output shows printing 9 lines, a break, then printing 25 lines as expected using the defined functions.

Uploaded by

rah h
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
718 views

Cs 1101 Programming Fundamentals Programming Assign Unit 2

The document defines functions to print new lines, three lines, and nine lines. It then uses these functions to print 9 lines, and 25 lines by calling the functions and combining them. The output shows printing 9 lines, a break, then printing 25 lines as expected using the defined functions.

Uploaded by

rah h
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

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)

You might also like