Guest User

Untitled

a guest
Jul 17th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. '''
  2. Programming Assignnment Unit 4
  3. University of the People
  4. CS 1101 - AY2018 - T5
  5. '''
  6.  
  7.  
  8. #Creates the given number of new lines(defaults to one)
  9. def new_line(number = 1):
  10. print('\n' * number)
  11.  
  12. #Creates 3 lines by calling the new_line function with an input of 3
  13. def three_lines():
  14. new_line(3)
  15.  
  16. #Demonstrates a nested function
  17. def nine_lines():
  18. print('Now printing nine (9) blank lines:')
  19. three_lines()
  20. three_lines()
  21. three_lines()
  22.  
  23. #Clears the screen by printing 25 blank lines(input of 25 to new_line)
  24. def clear_screen():
  25. print('Now priting twenty-five (25) blank lines:')
  26. new_line(25)
  27.  
  28. #Call to nine lines
  29. nine_lines()
  30.  
  31. #Call to clear scren
  32. clear_screen()
Add Comment
Please, Sign In to add comment