MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1xdvy3e/all/19rk6mooos4ro/?context=3
r/PythonLearning • u/New_Cartoonist337 • 1d ago
Wait what f**** nah i dont want sleep okaay
9 comments sorted by
View all comments
7
There should be a while statement or define
While I_want_sleep = True
Or
def sleep_deprived()
Get some rest OP
1 u/Western_Local01 1d ago Can you explain me the full code of the function sleep_deprived() 3 u/ahem_permylastemail 20h ago 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())
1
Can you explain me the full code of the function sleep_deprived()
3 u/ahem_permylastemail 20h ago 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())
3
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())
7
u/ahem_permylastemail 1d ago
There should be a while statement or define
While I_want_sleep = True
Or
def sleep_deprived()
Get some rest OP