#Rock-paper-scissors program evaluation

2 messages · Page 1 of 1 (latest)

wild cipherBOT
#

@junior marsh

OlympusTiger Uploaded Some Code

I tried making my first program in python. Rock paper scissors. What do you think?

Attachment: Rockpaperscissors2.py

# Online Python - IDE, Editor, Compiler, Interpreter
# rock paper scissors
list=["R","P","S"] 
P1=input("Player1 choose rock(r), paper(p) or scissors(s)") 
P2=input("Player2 choose rock(r), paper(p) or scissors(s)")
C1= P1.upper() in list
C2= P2.upper() in list
while (P1.upper()==P2.upper()) or ((C1==False) or (C2==False)) :
    P1=input("Player1 choose again rock(r), paper(p) or scissors(s)") 
    P2=input("Player2 choose again rock(r), paper(p) or scissors(s)")
    C1= P1.upper() in list
    C2= P2.upper() in list
if P1.upper=="R":
    if P2.upper=="P":
        print("Player2 wins")
    else:
        print("Player1 wins")
elif P1.upper=="P":
    if P2.upper=="S":
        print("Player2 wins" )
    else:
        print("Player1 wins")
else:
    if P2.upper=="P":
        print("Player1 wins") 
    else:
        print("Player2 wins")

    

errant swift
#

The first thing I notice is that you rename the built-in list with your own variable