forked from course-work/week1
more
This commit is contained in:
18
03-birthday/README.md
Normal file
18
03-birthday/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
Age Calculator
|
||||
===============
|
||||
|
||||
###Part 1
|
||||
|
||||
Create a program that will take user input and tell them their age in months, days, hours, and minutes.
|
||||
|
||||
Sample output:
|
||||
```
|
||||
How old are you? 18
|
||||
months : 216, days : 6480, hours : 155520, and minutes : 388800
|
||||
```
|
||||
|
||||
###Part 2
|
||||
|
||||
Add a function to your program that takes the user's birthday as input in `YYYY-MM-DD` format and tells them their age in months, days, hours and minutes in the same fashion.
|
||||
|
||||
Hint: Take a look at Python's `datetime` library.
|
5
03-birthday/convert.py
Normal file
5
03-birthday/convert.py
Normal file
@ -0,0 +1,5 @@
|
||||
def age_to_time(age):
|
||||
pass
|
||||
|
||||
def birthday_to_time(birthday):
|
||||
pass
|
Reference in New Issue
Block a user