25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

02-devine-nombre.py 371 B

1234567891011121314151617
  1. import random
  2. secret = random.randint(0, 100)
  3. print("Devine le nombre auquel je pense")
  4. while True:
  5. response = input("votre reponse: ")
  6. response = int(response)
  7. if response == secret:
  8. print("Gagné")
  9. break
  10. else:
  11. if response > secret:
  12. print("Trop grand")
  13. if response < secret:
  14. print("Trop petit")