← Back to context

Comment by OutOfHere

4 months ago

choices = [

  1/4 tsp of potassium bicarbonate powder in 8 oz of water,

  200 mg L-theanine,

  30 minutes of a podcast,

]

while choices and not sleep:

  choice = choices.pop(0)

  take_choice(choice)

  wait(25 * 60)

Could you elaborate this?

  • You will remove the last listed “choice” from the list and “take” it (presumably one “takes” a podcast by watching it). After taking each choice, you will wait for 25 minutes, during which time you are expected to fall asleep. If you do not fall asleep in those 25 minutes you will repeat this process with the now-current last item in the list. If the list is exhausted and you are still awake, you and the program terminate.