fork download
  1. import random
  2.  
  3. battery = random.randint(0,100)
  4.  
  5. if battery > 70:
  6. print("robot: fast mode")
  7. elif battery >= 30:
  8. print("robot:normal mode")
  9. else:
  10. print("robot:charging")
Success #stdin #stdout 0.02s 11620KB
stdin
Standard input is empty
stdout
robot: fast mode