Advertisement
SimeonTs

SUPyF Functions - 01. Blank Receipt

Jun 15th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.13 KB | None | 0 0
  1. """
  2. Functions and Debugging
  3. Проверка: https://judge.softuni.bg/Contests/Compete/Index/922#0
  4.  
  5. 01. Blank Receipt
  6.  
  7. Условие:
  8. Create a function that prints a blank cash receipt. The function should invoke three other functions:
  9. one for printing the header, one for the body and one for the footer of the receipt.
  10. The header should contain the following text:
  11. CASH RECEIPT
  12. ------------------------------
  13. The body should contain the following text:
  14. Charged to____________________
  15. Received by___________________
  16. And the text for the footer:
  17. ------------------------------
  18. © SoftUni
  19.  
  20. Examples
  21. Output
  22.  
  23. CASH RECEIPT
  24. ------------------------------
  25. Charged to____________________
  26. Received by___________________
  27. ------------------------------
  28. © SoftUni
  29. """
  30.  
  31.  
  32. def header():
  33.     print(f"CASH RECEIPT")
  34.     print(f"------------------------------")
  35.  
  36.  
  37. def body():
  38.     print(f"Charged to____________________")
  39.     print(f"Received by___________________")
  40.  
  41.  
  42. def footer():
  43.     print(f"------------------------------")
  44.     print(f"© SoftUni")
  45.  
  46.  
  47. def print_all():
  48.     header()
  49.     body()
  50.     footer()
  51.  
  52.  
  53. print_all()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement