Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input("Enter your name: ")
- bottom_num = float(input("Enter your age: "))
- month = input("Enter month of birth: ")
- age1 = 5
- age2 = 10
- age3 = 20
- age4 = 30
- def agef(bottom_num):
- if bottom_num <= 10:
- return 5
- elif bottom_num <= 20:
- return 10
- elif bottom_num <= 30:
- return 20
- elif bottom_num > 30:
- return 30
- months = ("December", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October","November")
- def seasonf(month):
- if month == months[0] or month == months[1] or month == months[2]:
- return "winter"
- elif month == months[3] or month == months[4] or month == months[5]:
- return "spring"
- elif month == months[6] or month == months[7] or month == months[8]:
- return "summer"
- elif month == months[9] or month == months[10] or month == months[11]:
- return "fall"
- season = str(seasonf(month))
- age = str(agef(bottom_num))
- print("Your name is " + name + ", you are over " + age + " years old and were born in the " + season + ".")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement