Python Forum
New to Coding, help please?!
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to Coding, help please?!
#3
age = int(input("Enter your age: "))

if age  <= -1:
    print ("You are time traveler of age", age)
elif age >= 0 and age <= 1:
    print("You are a baby of age",age)
elif age < 3:
    print("You are a toddler of age", age)
elif age < 5:
    print("You are an infant of age", age)


"You have 6 more years until your are a teenager!" How do I figure this part out? I need my program to tell me how many years it will take to move up to the next age group.
Reply


Messages In This Thread
New to Coding, help please?! - by zepel - Apr-20-2017, 01:20 AM
RE: New to Coding, help please?! - by sdcaliber - Apr-20-2017, 01:49 AM
RE: New to Coding, help please?! - by zepel - Apr-20-2017, 03:29 AM
RE: New to Coding, help please?! - by sdcaliber - Apr-20-2017, 04:01 AM
RE: New to Coding, help please?! - by sdcaliber - Apr-20-2017, 04:18 AM
RE: New to Coding, help please?! - by zepel - Apr-20-2017, 04:15 AM
RE: New to Coding, help please?! - by volcano63 - Apr-20-2017, 08:33 AM

Forum Jump:

User Panel Messages

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