SimeonTs

SUPyF2 D.Types and Vars Lab - 02. Centuries to Minutes

Sep 26th, 2019
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. """
  2. Data Types and Variables - Lab
  3. Check your code: https://judge.softuni.bg/Contests/Practice/Index/1721#1
  4. Video: https://www.youtube.com/watch?v=i2vHypjJkB4
  5.  
  6. SUPyF2 D.Types and Vars Lab - 02. Centuries to Minutes
  7.  
  8. Problem:
  9. Write program to enter an integer number of centuries and convert it to years, days, hours and minutes.
  10. Input   Output
  11. 1       1 centuries = 100 years = 36524 days = 876576 hours = 52594560 minutes
  12. 5       5 centuries = 500 years = 182621 days = 4382904 hours = 262974240 minutes
  13.  
  14. • Assume that a year has 365.2422 days at average (the Tropical year).
  15. """
  16. centuries = int(input())
  17. years = centuries * 100
  18. days = int(years * 365.2422)
  19. hours = 24 * days
  20. minutes = 60 * hours
  21. print(f"{centuries} = {years} years = {days} days = {hours} hours = {minutes} minutes")
Add Comment
Please, Sign In to add comment