
December 7th, 2012, 02:19 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 2
Time spent in forums: 16 m 50 sec
Reputation Power: 0
|
|
|
Code Help!
I'm making a program that tells the user how old they are in years, minutes, seconds and how much longer they have left to live in minutes asuming they'll live to 85. But it comes as Error, can someone help me find it?
Code:
#This program will ask for the user's First and Last name as well as their age.
print ('Hello, what is your first name?')
firstName=input()
print ('Hello ' + firstName + ', what is your last name?')
lastName=input()
print ('How old are you?')
ageYears=input()
ageMinutes=ageYears*525600
ageSeconds=ageMinutes*60
ageLeft=(85-ageYears)*525600
print(firstName + ' ' + lastName + ', welcome to the program. You are ' + ageYears + ' years old, and have lived for approximately ' + ageMinutes + ' minutes. You have approximately ' + ageLeft + ' minutes left in your life if you live to be 85. Enjoy the rest of your life, ' + firstName + ', as it will be over in approximately ' + ageSeconds + ' seconds.')
|