Preparing git repo for final project
This commit is contained in:
17
problems/pset1/meal/meal.py
Normal file
17
problems/pset1/meal/meal.py
Normal file
@@ -0,0 +1,17 @@
|
||||
def main():
|
||||
t = convert(input("What time is it?\t\t"))
|
||||
if 7 <= t <= 8:
|
||||
print("breakfast time")
|
||||
elif 12 <= t <= 13:
|
||||
print("lunch time")
|
||||
elif 18 <= t <= 19:
|
||||
print("dinner time")
|
||||
|
||||
|
||||
def convert(time):
|
||||
h ,m = map(int, time.split(":"))
|
||||
return float(h + m / 60)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Reference in New Issue
Block a user