Advertisement
Guest User

Untitled

a guest
May 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. state = ()
  2. started=False
  3. while True:
  4. state = input(">").lower()
  5. if state == "start" :
  6. if started == False:
  7. print("Car is already started")
  8. else:
  9. started = True
  10. print("Car started")
  11. elif state == "stop":
  12. if not started:
  13. print("Samir u mad car is already stopped!!!")
  14. else:
  15. started = False
  16. print("Car stoppped")
  17. elif state == "help":
  18. print("""
  19. Start- to start a car
  20. Stop- to stop a car
  21. Quit- to exit
  22. """)
  23. elif state == "quit":
  24. break
  25. else:
  26. print("I dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement