def main(): #1453BeratPasa
input_time = input("What time is it? ")
hours, minutes = input_time.split(":")
time = convert(hours, minutes)
if 7.00 <= time <= 8.00:
print("breakfast time")
elif 12.00 <= time <= 13.00:
print("lunch time")
elif 18.00 <= time <= 19.00:
print("dinner time")
else:
pass
def convert(hours, minutes):
return float(hours) + float(minutes) / 60
if name == "main":
main()
cs50.harvard.edu
check50 cs50/problems/2022/python/meal
Kodumu üstteki linke kontrol ettiriyorum, kabul etmiyor.
input_time = input("What time is it? ")
hours, minutes = input_time.split(":")
time = convert(hours, minutes)
if 7.00 <= time <= 8.00:
print("breakfast time")
elif 12.00 <= time <= 13.00:
print("lunch time")
elif 18.00 <= time <= 19.00:
print("dinner time")
else:
pass
def convert(hours, minutes):
return float(hours) + float(minutes) / 60
if name == "main":
main()
Meal Time - CS50's Introduction to Programming with Python
An introduction to programming using Python, a popular language for general-purpose programming, data science, web programming, and more.
check50 cs50/problems/2022/python/meal
Kodumu üstteki linke kontrol ettiriyorum, kabul etmiyor.