Skip to content

Instantly share code, notes, and snippets.

@nutchy
Last active September 18, 2018 14:08
Show Gist options
  • Save nutchy/2801f8ae310f19cfa2822b77af71a2ff to your computer and use it in GitHub Desktop.
Save nutchy/2801f8ae310f19cfa2822b77af71a2ff to your computer and use it in GitHub Desktop.
"""Challenge: Month"""
def main(num):
"""
Print month name using number input
1 => January, 2 => Febuary, 3 => March, ... , 12 => December
"""
month_list = "01January02February03March04April05May06June07July08August09September10October11November12December13"
start = month_list.index("%02d" % (num)) + 2
end = month_list.index("%02d" % (num + 1))
print(month_list[start:end])
main(int(input()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment