Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Это архивный репозиторий. Вы можете его клонировать или просматривать файлы, но не вносить изменения или открывать задачи/запросы на слияние.
 
 
 
 
 
 

37 строки
995 B

  1. class Robot:
  2. pass
  3. def main():
  4. robot = Robot()
  5. print("Le premier robot n'a pas encore de nom")
  6. print("La ligne suivante doit afficher None")
  7. print("01", robot.nom())
  8. print("On démarre le premier robot")
  9. robot.démarre()
  10. print("Le permier robot a maintenan un nom")
  11. print("La ligne suivante doit afficher un nom au hasard")
  12. print("02", robot.nom())
  13. print("Le nom ne change pas tant que le robot n'est pas re-initialisé")
  14. print("La ligne suivante doit afficher le même nom que la ligne 02")
  15. robot.éteint()
  16. robot.démarre()
  17. print("03", robot.nom())
  18. print("Le nom est effacé quand on réinitialise le robot")
  19. print("La ligne suivante doit afficher None")
  20. robot.réinitialise()
  21. print("04", robot.nom())
  22. print("Un nouveau nom est généré quand on re-démarre le robot")
  23. print("La ligne suivante doit afficher un nom différent de la ligne 03")
  24. robot.démarre()
  25. print("05", robot.nom())
  26. main()