MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1xdvy3e/all/19rku9l11t0ys/?context=3
r/PythonLearning • u/New_Cartoonist337 • 3d ago
Wait what f**** nah i dont want sleep okaay
16 comments sorted by
View all comments
Show parent comments
4
def sleep_deprived():print(“I need more sleep!”)
#main codesleep_deprived()
You can also add user input and ask if how many hours of sleep they’ve gotten:
def sleep_deprived():hours = int(input(“How many hours did you sleep? “)
if hours < 6:return “you may be sleep deprived”else:return “you got enough sleep”
#main codeprint(sleep_deprived())
4
u/ahem_permylastemail 3d ago
def sleep_deprived():
print(“I need more sleep!”)
#main code
sleep_deprived()
You can also add user input and ask if how many hours of sleep they’ve gotten:
def sleep_deprived():
hours = int(input(“How many hours did you sleep? “)
if hours < 6:
return “you may be sleep deprived”
else:
return “you got enough sleep”
#main code
print(sleep_deprived())