Skip to content

Instantly share code, notes, and snippets.

@mekhami
Last active February 27, 2016 19:30
Show Gist options
  • Select an option

  • Save mekhami/7b4a8198d8eaa5028e5a to your computer and use it in GitHub Desktop.

Select an option

Save mekhami/7b4a8198d8eaa5028e5a to your computer and use it in GitHub Desktop.
calendar = {
'2016': {
'January': ['01/03/2016 : Quadrantids Meteor Shower','01/04/2016 : Quadrantids Meteor Shower Continued','01/10/2016 : New Moon','01/24/2016 : Full Moon'],
'February': ['02/07/2016 : Mercury at Greast WEstern Elongation','02/08/2016 : New Moon','02/22/2016 : Full Moon','3'],
'March': ['03/08/2016 : Jupiter at Oppostion','03/09/2016 : New Moon & Total Solar Eclipse','03/20/2016 : March Equinox','03/23/2016 : Full Moon & Penumbral Lunar Eclipse'],
'April': ['04/07/2016 : New Moon,', '04/18/2016 : Mercury at Greatest Easter Elongation','04/22/2016 : Full Moon & Lyrids Metero Shower','04/23/2016 : Lyrids Meteor Shower Continued'],
'May': ['05/06/2016 : New Moon & Eta Aquarids Meteor Shower','05/07/2016 : Eta Aquarids Meteor Shower Continued','05/09/2016 : Rare Tansit of Mercury Across the Sun','05/14/2016 : Internation Astronomy Day!!','05/21/2016 : Full Moon & Its a Blue Moon!','05/22/2016 : Mars at Oppostion'],
'June': ['06/03/2016 : Saturn at Oppostion','06/05/2016 : New Moon & Mercury at Greatest Western Elongation','06/20/2016 : Full Moon & June Solstice'],
'July': ['07/04/2016 : New Moon & Juno Will reach Juno','07/19/2016 : Full Moon','07/28/2016 : Delta Aqaurids Meteor Shower',' 07/29/2016 : Delta Aquarids Meteor Shower'],
'August': ['08/02/2016 : New Moon','08/12/2016 : Perseids Meteor Shower','08/13/2016 : Perseids Meteor Shower Continued','08/16/2016 : Mercury at Greatest Eastern Elongation','08/18/2016 : Full Moon','08/27/2016 : Conjunction of Venus and Jupiter'],
'September': ['09/01/2016 : Annular Solar Eclipse','09/03/2016 : Neptune at Oppostion','09/16/2016 : Full Moon & Penumbral Lunar Eclipse','09/22/2016 : September Equinox','09/28/2016 : Mercury at Greatest Western Elongation'],
'October': ['10/01/2016 : New Moon','10/07/2016 : Draconids Meteor Shower','10/15/2016 : Uranus at Oppostion','10/16/2016 : Full Moon and Its a Super Moon','10/21/2016 : Orionids Meteor Shower','10/22/2016 : Orionids Meteor Shower Continued','10/30/2016 : New Moon'],
'November': ['11/04/2016 : Taurids Meteor Shower','11/05/2016 : Taurids Meteor Shower','11/14/2016 : Full Moon and its a SUPERMOON','11/17/2016 : Leonids Meteor Shower','11/18/2016 : Leonids Meteor Shower Continued','11/29/2016 : New Moon'],
'December': ['12/11/2016 : Mercury at Greatest Eastern Elongation','12/13/2016 : Geminids Meteor Shower',' 12/14/2016 : Geminids Meteor Shower','12/14/2016 : Full Moon and its a SUPERMOON!','12/21/2016 : December Solstice','12/21/2016 Ursids Meteor Shower','12/22/2016 : Ursids Meteor Shower Continued','12/29/2016 : New Moon'],
},
'2017': {
'January': ['01/03/2017 : Quadrantids Meteor Shower','01/12/2017 : Full Moon and Venus at greatest Elongation','01/19/2017 : Mercury at Greatest Western Elongation','01/28/2017 : New Moon'],
'February': ['02/11/2017 : Full Moon and Penumbral Lunar Exlipse', '02/26/2017: Annular Solar Eclipse and New Moon'],
'March': ['03/12/2017 : Full moon', '03/20/2017 : March Equinox', '03/28/2017 : New Moon'],
'April': ['04/01/2017 : Mercury at Greatest Eastern Elongation' , '04/07/2017 : Jupiter at Oppostion', '04/11/2017 : Full Moon' , '04/22/2017 : Lyrids Metoero Shower','04/22/2017: Lyrids Meteor Shower continued' , '04/26/2017 : New Moon'],
'May': ['05/06/2017 : Eta Aquarids Meteor Shower' , '05/06/2017 : Era Aquarids Meteor Shower Continued' , '05/10/2017 : Full Moon' , '05/17/2017 : Mercury at Greatest Western Elongation', '05/25/2017 : New Moon'],
'June': ['06/3/2017 : Venus at Greatest Western Elongation,' , '06/09/2017 : Full Moon' , '06/15/2017 : Saturn at Oppositon' , '06/21/2017 : June Solstice' ,' 06/24/2017 : New Moon'],
'July': ['07/09/2017 : Full Moon', '07/23/2017 : New Moon', '07/28/2017 : Delta Aquarids Meteor Shower' , '07/29/2017 Delta Aquarids Meteor Shower Continued','07/30/2017 : Mercury at Greatest Eater Elongation'],
'August': ['08/07/2017 : Full Moon & Partial Lunar Eclipse' , '08/12/13 : Perseids Meteor Shower','08/13/13 : Perseids Meteor Shower Continued','08/21/2017 : New Moon & Total Solar Eclipse'],
'September': ['09/05/2017 : Neptune at Oppostion' , '09/06/2017 : Full Moon','09/12/2017 : Mercury at Greatest Western Elongtation','09/20/2017 : New Moon','09/22/2017 : September Equinox'],
'October': ['10/05/2017 : Full Moon','10/07/2017 : Draconids Meteor Shower','10/19/2017: New Moon & Uranus at Oppostion','10/21/2017 : Orionids Meteor Shower', '10/22/2017 : Orionids Meteor Shower'],
'November': ['11/04/2017 : Full moon and Raurids Meteor Shower','11/05/2017 : Taurids Meteor Shower Continued','10/13/2017 : Conjunction of Venus and Jupiter','10/17/2017 : Leonids Meteor Shower','10/18/2017 : Leonids Meteor Shower Continued & New Moon', '10/24/2017 : Mercury at Greatest Eastern Elongation'],
'December': ['12/03/2017 : Full Moon & SUPER MOON' ,'12/13/2017 : Geminids Metero Shower','12/13/2017 : Geminids Meteor Shower Continued','12/18/2017 : New Moon','12/21/2017 : December Solstice','12/21/2017 : Ursids Meteor Shower','12/22/2017 : Ursids Meteor Shower Continued'],
}
}
# What year and month do we query?
year = input('What year? ')
month = input('What Month? ').capitalize()
# The number of events in that month is the length of the array for that month.
num_events = len(calendar[year][month])
# Provide a bit more info, and prompt for a bit more information.
print('There are {} events in {}.'.format(num_events, month))
day = int(input('What day would you like to view? ')) # We convert this to an int so we can use it as a list index.
event = calendar[year][month][day] # Finally, get the value the user asked for.
print('{} will be occuring on that day, enjoy!'.format(event))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment