Add menu
This commit is contained in:
9
menu/task.py
Normal file
9
menu/task.py
Normal file
@ -0,0 +1,9 @@
|
||||
import random
|
||||
import time
|
||||
|
||||
|
||||
def risky_task() -> str:
|
||||
if random.random() > 0.25:
|
||||
time.sleep(1)
|
||||
raise ValueError("Random failure occurred")
|
||||
return "Task succeeded!"
|
Reference in New Issue
Block a user