Skip to content
Open
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7ea5adf
Updated from Brython Server: 2/1/2019 2:39:33 PM
waSclthu11 Feb 1, 2019
58ceaad
Updated from Brython Server: 2/1/2019 2:39:36 PM
waSclthu11 Feb 1, 2019
62a5613
Updated from Brython Server: 2/1/2019 2:50:40 PM
waSclthu11 Feb 1, 2019
6735a7f
Updated from Brython Server: 2/1/2019 2:51:21 PM
waSclthu11 Feb 1, 2019
c8ff6b8
Updated from Brython Server: 2/1/2019 2:53:46 PM
waSclthu11 Feb 1, 2019
32cf3bf
Updated from Brython Server: 2/1/2019 2:55:03 PM
waSclthu11 Feb 1, 2019
8037084
Updated from Brython Server: 2/1/2019 2:55:12 PM
waSclthu11 Feb 1, 2019
04aab3d
Updated from Brython Server: 2/1/2019 2:55:53 PM
waSclthu11 Feb 1, 2019
2ce1936
Updated from Brython Server: 2/1/2019 2:56:31 PM
waSclthu11 Feb 1, 2019
2f3741d
Updated from Brython Server: 2/4/2019 2:04:16 PM
waSclthu11 Feb 4, 2019
a7a02d4
Updated from Brython Server: 2/4/2019 2:04:19 PM
waSclthu11 Feb 4, 2019
917a9d1
Updated from Brython Server: 2/4/2019 2:05:42 PM
waSclthu11 Feb 4, 2019
745e728
Updated from Brython Server: 2/4/2019 2:06:53 PM
waSclthu11 Feb 4, 2019
f55a56d
Updated from Brython Server: 2/4/2019 2:07:33 PM
waSclthu11 Feb 4, 2019
9bb2089
Updated from Brython Server: 2/4/2019 2:25:18 PM
waSclthu11 Feb 4, 2019
1e39bc2
Updated from Brython Server: 2/4/2019 2:30:11 PM
waSclthu11 Feb 4, 2019
40538f0
Updated from Brython Server: 2/4/2019 2:41:56 PM
waSclthu11 Feb 4, 2019
da1e5d8
Updated from Brython Server: 2/4/2019 2:41:59 PM
waSclthu11 Feb 4, 2019
ccba885
Updated from Brython Server: 2/4/2019 2:47:52 PM
waSclthu11 Feb 4, 2019
0d87823
Updated from Brython Server: 2/4/2019 2:51:10 PM
waSclthu11 Feb 4, 2019
43f30d9
Updated from Brython Server: 2/5/2019 10:19:49 AM
waSclthu11 Feb 5, 2019
e2df2ef
Updated from Brython Server: 2/5/2019 1:24:25 PM
waSclthu11 Feb 5, 2019
96775a7
Updated from Brython Server: 2/5/2019 1:24:30 PM
waSclthu11 Feb 5, 2019
0bd2332
Updated from Brython Server: 2/5/2019 2:00:31 PM
waSclthu11 Feb 5, 2019
ca5b858
Updated from Brython Server: 2/5/2019 2:03:30 PM
waSclthu11 Feb 5, 2019
92c41c3
Updated from Brython Server: 2/5/2019 2:03:41 PM
waSclthu11 Feb 5, 2019
2ccc8ef
Updated from Brython Server: 2/5/2019 2:04:42 PM
waSclthu11 Feb 5, 2019
3cf77df
Updated from Brython Server: 2/5/2019 2:06:07 PM
waSclthu11 Feb 5, 2019
c158a30
Updated from Brython Server: 2/5/2019 2:06:11 PM
waSclthu11 Feb 5, 2019
e93d409
Updated from Brython Server: 2/5/2019 2:37:47 PM
waSclthu11 Feb 5, 2019
001fe9e
Updated from Brython Server: 2/5/2019 2:37:54 PM
waSclthu11 Feb 5, 2019
0f644a3
Updated from Brython Server: 2/5/2019 2:37:55 PM
waSclthu11 Feb 5, 2019
892e13b
Updated from Brython Server: 2/5/2019 2:46:57 PM
waSclthu11 Feb 5, 2019
ff41295
Updated from Brython Server: 2/5/2019 2:46:59 PM
waSclthu11 Feb 5, 2019
7d111d5
Updated from Brython Server: 2/5/2019 2:49:32 PM
waSclthu11 Feb 5, 2019
0a3be65
Updated from Brython Server: 2/5/2019 2:49:34 PM
waSclthu11 Feb 5, 2019
f23ae78
Updated from Brython Server: 2/5/2019 2:54:52 PM
waSclthu11 Feb 5, 2019
8069eb3
Updated from Brython Server: 2/6/2019 9:09:26 AM
waSclthu11 Feb 6, 2019
63b4c37
Updated from Brython Server: 2/6/2019 9:09:29 AM
waSclthu11 Feb 6, 2019
2d21ea3
Updated from Brython Server: 2/7/2019 1:56:54 PM
waSclthu11 Feb 7, 2019
76c0366
Updated from Brython Server: 2/7/2019 2:05:29 PM
waSclthu11 Feb 7, 2019
5f8b319
Updated from Brython Server: 2/7/2019 2:32:19 PM
waSclthu11 Feb 7, 2019
4d29d1e
Updated from Brython Server: 2/7/2019 2:44:04 PM
waSclthu11 Feb 7, 2019
34655b6
Updated from Brython Server: 2/7/2019 2:49:34 PM
waSclthu11 Feb 7, 2019
18fee16
Updated from Brython Server: 2/8/2019 9:47:40 AM
waSclthu11 Feb 8, 2019
87301f3
Updated from Brython Server: 2/8/2019 9:48:16 AM
waSclthu11 Feb 8, 2019
b2dfe26
Updated from Brython Server: 2/8/2019 9:48:23 AM
waSclthu11 Feb 8, 2019
1806961
Updated from Brython Server: 2/8/2019 9:50:46 AM
waSclthu11 Feb 8, 2019
cc2ec98
Updated from Brython Server: 2/8/2019 1:57:01 PM
waSclthu11 Feb 8, 2019
ed53f35
Updated from Brython Server: 2/8/2019 1:57:02 PM
waSclthu11 Feb 8, 2019
57ecf44
Update birthday.py
tiggerntatie Feb 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 55 additions & 2 deletions birthday.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
birthday.py
Author: <your name here>
Credit: <list sources used, if any>
Author: waSclthu11
Credit: The conditionals tutorial.
Assignment:

Your program will ask the user the following questions, in this order:
Expand Down Expand Up @@ -31,3 +31,56 @@
And the day? 11
Eric, you are a fall baby of the stone age.
"""
"""Winter (winter) babies were born in months of December through February.
Spring (spring) babies were born in months of March through May.
Summer (summer) babies were born in the months of June through August.
Fall (fall) babies were born in the months of September through November.
Years from 1980-1989 are known as the eighties.
Years from 1990-1999 are known as the nineties.
Years from 2000 through today are known as the two thousands.
Years prior to 1980 are known as the Stone Age."""
from datetime import datetime
from calendar import month_name
todaymonth = datetime.today().month
todaydate = datetime.today().day
month = month_name[todaymonth]
name = str(input("Hello, what is your name? "))
monthquestion = "Hi {0}, what was the name of the month you were born in? "
month = str(input(monthquestion.format(name)))
month=month
yearquestion = "And what year were you born in, {0}? "
year = (int(input(yearquestion.format(name))))
day = int(input("And the day? "))
currentyear = datetime.today().year
currentyear = int(currentyear)
if month == ('June' or 'june' or 'July' or 'july' or 'august' or 'August'):
season="summer"
if (month == 'September' or 'september' or 'October' or 'october' or 'November' or 'november'):
season="fall"
if (month == 'December' or 'december' or 'January' or 'january' or 'February' or 'february'):
season="winter"
if (month == 'March' or 'march' or 'April' or 'april' or 'May' or 'may'):
season="spring"
if (year < 1980):
age="Stone Age"
else:
if (year>=1980 and year<=1989):
age="eighties"
else:
if (year >= 1990 and year <=1999):
age="nineties"
else:
if (year >=2000 and year <=currentyear):
age="two thousands"
else:
if (year > currentyear):
age="The Future"
if (todaydate == day):
print("Happy birthday!")
elif (todaydate > day or todaydate < day):
if (day == 31 and (month == 'October' or month == 'october')):
print ("You were born on Halloween!")
else:
print( name +", you are a {0} baby of the ".format(season) + age + ".")