+ 9
[challenge] code, eat and sleep - but planned! 💤💤💤💤💻💻🍴🍴🍴
We all know, we cant do all things immediately. We have to plan. Define three functions(code,eat,sleep) with parameter hours. Assign a priority to each function. If you call that functions, they should not be processed immediatly but scheduled. The call of a further function doit() tells the functions to run as they are scheduled: Use your own rule for schedule. Example: Rule: Highest prio first. Prios: code():1 eat():2 sleep():3 call code(1) call sleep(2) call eat(1) call code(2) call eat(2) call doit() Output: code 1 hour code 2 hours eat 1 hour eat 2 hours sleep 2 hours choose your own weapon, your own rule, your own prios Have fun
9 Respostas
+ 9
My try.. very late!
Thank you! I really enjoyed doing this one!
https://code.sololearn.com/cj9b1FbHLhxp/?ref=app
+ 6
https://code.sololearn.com/WcIapOO6qj41/?ref=app
+ 5
Ty, your challenge suggestion just offered a great idea for my current task manager project.
+ 3
https://code.sololearn.com/chKDvGrIB3TU/?ref=app
My try. Doesn't read input exactly the way as proposed though.
Kindly let me know if it is must to add 'call' to the inputs as well, or if my version will be accepted.
+ 2
@Oma Falk
Can you please notify me whether the code ran now or not? If possible, that is...