last-update
This commit is contained in:
+15
-12
@@ -4,8 +4,9 @@ score_IA = 0
|
|||||||
tentative = 0
|
tentative = 0
|
||||||
manche = 0
|
manche = 0
|
||||||
max_manche = 10
|
max_manche = 10
|
||||||
print("BIENVENUE DANS 1,2,3 PIERRE FEUILLE CISEAUX 🎮")
|
ID = input("veuillez saisir votre nom avant de commencer !")
|
||||||
print("le score est actuellement de :","Player👤 =",score_p,"et","IA 🤖 =",score_IA)
|
print("BIENVENUE,DANS 1,2,3 PIERRE FEUILLE CISEAUX 🎮",ID)
|
||||||
|
print("le score est actuellement de :",ID,"👤 =",score_p,"et","IA 🤖 =",score_IA)
|
||||||
#choix du joueur
|
#choix du joueur
|
||||||
while tentative <= 5 and manche < max_manche and score_IA >= 0 and score_p >= 0:
|
while tentative <= 5 and manche < max_manche and score_IA >= 0 and score_p >= 0:
|
||||||
option_player=input("choisissez :" "pierre, feuille , ciseaux : ")
|
option_player=input("choisissez :" "pierre, feuille , ciseaux : ")
|
||||||
@@ -16,43 +17,45 @@ while tentative <= 5 and manche < max_manche and score_IA >= 0 and score_p >= 0:
|
|||||||
if option_player == "pierre" and option_IA == "feuille" and tentative <= 5:
|
if option_player == "pierre" and option_IA == "feuille" and tentative <= 5:
|
||||||
print("IA a gagné !😊")
|
print("IA a gagné !😊")
|
||||||
score_IA = score_IA+1
|
score_IA = score_IA+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
elif option_player == "feuille" and option_IA == "ciseaux" and tentative <= 5:
|
elif option_player == "feuille" and option_IA == "ciseaux" and tentative <= 5:
|
||||||
score_IA = score_IA+1
|
score_IA = score_IA+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
print("IA a gagné !😊")
|
print("IA a gagné !😊")
|
||||||
elif option_player == "ciseaux" and option_IA == "pierre" and tentative <= 5:
|
elif option_player == "ciseaux" and option_IA == "pierre" and tentative <= 5:
|
||||||
print("IA a gagné !😊")
|
print("IA a gagné !😊")
|
||||||
score_IA = score_IA+1
|
score_IA = score_IA+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
#condition victoire player
|
#condition victoire player
|
||||||
elif option_player == "pierre" and option_IA == "ciseaux" and tentative <= 5:
|
elif option_player == "pierre" and option_IA == "ciseaux" and tentative <= 5:
|
||||||
print("Vous avez Gagné !🎉")
|
print("Vous avez Gagné !🎉")
|
||||||
score_p = score_p+1
|
score_p = score_p+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
elif option_player == "feuille" and option_IA == "pierre" and tentative <= 5:
|
elif option_player == "feuille" and option_IA == "pierre" and tentative <= 5:
|
||||||
print("Vous avez Gagné !🎉")
|
print("Vous avez Gagné !🎉")
|
||||||
score_p = score_p+1
|
score_p = score_p+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
elif option_player == "ciseaux" and option_IA == "feuille" and tentative <= 5:
|
elif option_player == "ciseaux" and option_IA == "feuille" and tentative <= 5:
|
||||||
print("Vous avez Gagné 🎉")
|
print("Vous avez Gagné 🎉")
|
||||||
score_p = score_p+1
|
score_p = score_p+1
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
#condition d'égalité
|
#condition d'égalité
|
||||||
elif option_player == "pierre" and option_IA == "pierre" and tentative <= 5:
|
elif option_player == "pierre" and option_IA == "pierre" and tentative <= 5:
|
||||||
print("égalité !🤝")
|
print("égalité !🤝")
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
elif option_player == "feuille" and option_IA == "feuille" and tentative <= 5:
|
elif option_player == "feuille" and option_IA == "feuille" and tentative <= 5:
|
||||||
print("égalité !🤝")
|
print("égalité !🤝")
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
elif option_player == "ciseaux" and option_IA == "ciseaux" and tentative <= 5:
|
elif option_player == "ciseaux" and option_IA == "ciseaux" and tentative <= 5:
|
||||||
print("égalité🤝")
|
print("égalité🤝")
|
||||||
print("le nouveau score est : Player👤:",score_p,"IA🤖:",score_IA)
|
print("le nouveau score est :",ID,"👤:",score_p,"IA🤖:",score_IA)
|
||||||
|
if option_player not in ["pierre","feuille","ciseaux"] :
|
||||||
|
print("Choix Invalide❌")
|
||||||
#exception
|
#exception
|
||||||
continuer = str(input("Voulez vous continuer ? :"))
|
continuer = str(input("Voulez vous continuer ? :"))
|
||||||
if continuer == "oui" and manche < max_manche:
|
if continuer == "oui" and manche < max_manche:
|
||||||
manche = manche+1
|
manche = manche+1
|
||||||
answer_IA1 = random.choice (["Fantastique !😊","Merveilleux !🎉", "Super !😁"])
|
answer_IA1 = random.choice (["Fantastique !😊","Merveilleux !🎉", "Super !😁",])
|
||||||
print(answer_IA1)
|
print(answer_IA1)
|
||||||
elif continuer == "non" :
|
elif continuer == "non" :
|
||||||
answer_IA2 = random.choice (["D'accord à Bientot !😊","C'était cool !😃", "A la prochaine !😁"])
|
answer_IA2 = random.choice (["D'accord à Bientot !😊","C'était cool !😃", "A la prochaine !😁"])
|
||||||
|
|||||||
Reference in New Issue
Block a user