Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculation error
#1
I'm new to programming and i'm trying to make a simple calculator that calculates how many days, minutes and seconds someone has been alive. Everytime I run it and give the age "9" for example, it only prints out a bunch of 9s.

print("Answer the questions to find out how long you have been living in this world")
name = input('What is your name? ')
print('What is your age ',(name),'?')
age=input('age: ')
days=age*365
minutes=age*525600
seconds=age*31536000
print(name,'Has been alive for:', days,'days',minutes,'minutes',seconds,'seconds')
Reply


Messages In This Thread
Calculation error - by RustyShacklevert - Sep-25-2018, 03:40 AM
RE: Calculation error - by Larz60+ - Sep-25-2018, 03:56 AM
RE: Calculation error - by RustyShacklevert - Sep-25-2018, 04:10 AM
RE: Calculation error - by Larz60+ - Sep-25-2018, 04:16 AM
RE: Calculation error - by RustyShacklevert - Sep-25-2018, 04:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python Calculation error: 39.8-0.1=39.699999999999996 wei 2 2,116 Jun-10-2019, 10:22 AM
Last Post: wei
  Calculation Inside Dictionary Error prophet11 3 2,631 Apr-22-2019, 05:23 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020