Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- months = {"01":11, "02":12, "03":1, "04":2, "05":3, "06":4,
- "07":5, "08":6, "09":7, "10":8, "11":9, "12":10}
- days = {"1":"Monday", "2":"Tuesday","3":"Wednesday","4":"Thursday","5":"Friday","6":"Saturday","0":"Sunday"}
- bMonth = input("Want to know the day of the week you were born?\n Enter a number for the month: MM ")
- bDay = input("Enter a number for the day: DD ")
- bYear = int(input("Enter the two digit year: (e.g. 70 for 1970) YY "))
- bCent = int(input("Enter the two digit century: (e.g. 19 for 1970) CC "))
- A = int(months[bMonth])
- B = int(bDay)
- if A == 11 or A == 12:
- if bYear == 00:
- bYear = 99
- bCent = bCent - 1
- else:
- bYear = bYear - 1
- C = bYear
- D = bCent
- W = int((13*A - 1) / 5)
- X = int(C / 4)
- Y = int(D / 4)
- Z = int(W + X + Y + B + C - 2*D)
- R = int((Z%7))
- if (R < 0):
- R = (R+7)%6
- print ("You were born on a " + days[str(R)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement