r/PythonLearning • • 29d ago

Help Request all😭✌️🥀

Post image

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

204 Upvotes

19 comments sorted by

15

u/ahem_permylastemail 29d ago

There should be a while statement or define

While I_want_sleep = True

Or

def sleep_deprived()

Get some rest OP

3

u/[deleted] 29d ago

[removed] — view removed comment

5

u/ahem_permylastemail 29d 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 26d ago

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

3

u/JerKYLL203 29d ago

🤣🤣🤣🤣

3

u/Sea-Ad7805 29d ago

More like this: real life

1

u/ProgramBrave718 29d ago

You can make functions also to check if your sleep level is good on the bases of sleeping hours.

1

u/soul-riepper 29d ago • Heartwarming

Keep going

1

u/[deleted] 29d ago

Missing an integer for hours of sleep. When hours of sleep equals {your_optimal_level_of_sleep} wakeup = true.

1

u/One_Scar1560 28d ago

Now try to make a whole Alarm app with python and pyGTK that runs on tray and tells you these stuff.

You gotta set your goals high ;)

1

u/KenyanPanther 28d ago

How slow is that execution. 0.4sec for just 6 line code? 😂😂

1

u/BusyRecognition608 26d ago

No wonder you will struggle in life.

1

u/Sweet_Computer_7116 25d ago

This code means you'll always be sleeping. Since the want is defined as always true.

And you can't fix it now. Because you're sleeping. 

Mans sleeping beautied himself.

Big L

1

u/tronco384 24d ago

Now try using a socket.