-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCiseau_Papier_Pierre.py
More file actions
27 lines (21 loc) · 928 Bytes
/
Ciseau_Papier_Pierre.py
File metadata and controls
27 lines (21 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import random
def jeu():
while True:
options=["papier","caiseau","pierre"]
choix=random.choice(options)
saisi=input("Veuillez realiser votre choix: papier ou caiseau ou pierre : ")
if(saisi==choix):
print("Egaux")
if(saisi=="papier" and choix=="caiseau"):
print("vous avez perdu ->"+saisi+" VS "+choix)
if(saisi=="papier" and choix=="pierre"):
print("vous avez gagnée ->"+saisi+" VS "+choix)
if(saisi=="pierre" and choix=="caiseau"):
print("vous avez gagne->"+saisi+" VS "+choix)
if(saisi=="pierre" and choix=="papier"):
print("vous avez perdu ->"+saisi+" VS "+choix)
if(saisi=="caiseau" and choix=="papier"):
print("vous avez gagnée ->"+saisi+" VS "+choix)
if(saisi=="caiseau" and choix=="pierre"):
print("vous avez perdu ->"+saisi+" VS "+choix)
jeu()