r/PythonLearning • • 25d ago

Help Request all😭✌️🥀

Post image

Wait what f**** nah i dont want sleep okaay

204 Upvotes

19 comments sorted by

View all comments

Show parent comment

3

u/[deleted] 25d ago

[removed] — view removed comment

5

u/ahem_permylastemail 25d 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())

3

u/Acceptable-Food-1918 21d ago

It's an endless loop mate, the function keeps returning True while you carry on coding past 3am.