This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Kristaph' | |
""" | |
http://redd.it/2agwnq | |
You remember those multiplication tables from elementary school, right? The ones where you choose a number on the | |
top row and one on the side and see where they meet on the chart? Good. It would be easy enough to just write it | |
out, but let's try using Python to our advantage. | |
Goal | |
Create a program that prints out a multiplication table for the numbers 1 through 9. It should include the numbers | |
1 through 9 on the top and left axises, and it should be relatively easy to find the product of two numbers. Do | |
not simply write out every line manually (ie print('7 14 21 28 35 49 56 63') ). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_datetime(d): | |
""" | |
Datetime parser | |
Creates datetimes from input into format yyyy-mm-dd hh:mm:ss | |
Needs proper validation! | |
Should accept following: | |
yyyy |