Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. currentPopulation = 307357870
  2.  
  3. yearToSeconds = 365*24*60*60
  4.  
  5. yearsToCalculate = int(input("Enter the number of desired years"))
  6.  
  7. if yearsToCalculate == -1:
  8. sys.exit("WRONG INPUT")
  9.  
  10. populationAfterYears = float(currentPopulation + ((yearsToCalculate*yearToSeconds)/7) + ((yearsToCalculate*yearToSeconds)/35) - ((yearsToCalculate*yearToSeconds)/13))
  11.  
  12. print("Updated population:", populationAfterYears)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement