Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currentPopulation = 307357870
- yearToSeconds = 365*24*60*60
- yearsToCalculate = int(input("Enter the number of desired years"))
- if yearsToCalculate == -1:
- sys.exit("WRONG INPUT")
- populationAfterYears = float(currentPopulation + ((yearsToCalculate*yearToSeconds)/7) + ((yearsToCalculate*yearToSeconds)/35) - ((yearsToCalculate*yearToSeconds)/13))
- print("Updated population:", populationAfterYears)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement