Dateien nach "/" hochladen
Schere, Stein, Papier
This commit is contained in:
commit
73a7de25ef
23
stp.py
Normal file
23
stp.py
Normal file
@ -0,0 +1,23 @@
|
||||
import getpass
|
||||
|
||||
punkte1 = 0
|
||||
punkte2 = 0
|
||||
while punkte1 or punkte2 < 3:
|
||||
|
||||
print ("S = Schere, R = Stein, P = Papier ")
|
||||
s1 = getpass.getpass( "Spieler 1 Wähle: ")
|
||||
s2 = getpass.getpass( "Spieler 2 Wähle: ")
|
||||
|
||||
if s1 == "s" and s2 == "p" or s1 == "p" and s2 == "r" or s1 == "r" and s2 == "s":
|
||||
print("Spieler 1 hat gewonnen")
|
||||
punkte1 += 1
|
||||
print("Spieler 1 hat :", punkte1, "Punkte")
|
||||
if punkte1 == 3:
|
||||
break
|
||||
else:
|
||||
print("Spieler 2 hat gewonnen")
|
||||
punkte2 += 1
|
||||
print("Spieler 2 hat:", punkte2, "Punkte")
|
||||
if punkte2 == 3:
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user