Skip to content

Commit

Permalink
g ou G, t ou T, p ou P)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelineSebe committed Oct 28, 2022
1 parent b9f1a55 commit 1f49a68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jeu_devin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ def machine_devine():
# Aider la machine à trouver m
# Fournir des indices après chaque mauvaise réponse
proposition = str(input("Trop (g)rand, trop (p)etit ou (t)rouvé "))
if proposition == "g":
if proposition == "g" or proposition == "G":
b = m
n_essai += 1 # Comptabiliser le nombre d'essais
m = (a + b)/2
print(f"Proposition {n_essai} :", int(m))
elif proposition == "p":
elif proposition == "p" or proposition == "P":
a = m
n_essai += 1
m = (a + b)/2
print(f"Proposition {n_essai} :", int(m))
elif proposition == "t":
elif proposition == "t" or proposition == "T":
# Machine a donné la bonne réponse
print(f"J'ai trouvé en {n_essai} essai(s)")
break
Expand Down

0 comments on commit 1f49a68

Please sign in to comment.