Rock, Paper Scissor Game in Python .... 100% Working Code

 


print('='*50)

print("Welcome to ROCK PAPER SCISSOR GAME!!!")

print('='*50)

print("You have to input in the following way : ")

print("0===>Rock")

print("1===>Paper")

print("2===>Scissor")

n=int(input("Enter No. of Rounds : "))

rps=["Rock","Paper","Scissor"]

from random import *

cs=hs=0

s=0

while n!=0:

    s+=1

    print("Welcome to ROUND NO.#",s)

    j=randint(0,2)

    ci=j

    n=n-1

    print("0===>Rock")

    print("1===>Paper")

    print("2===>Scissor")

    x=int(input("Enter Your Choice (0,1,2) : "))

    if x==0 and ci==0:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("It's a tie...COME AGAIN")

        print("Scores @ the end of this round are...")

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==0 and ci==1:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("I won..YAY...SCARED?")

        print("Scores @ the end of this round are...")

        cs+=1

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==0 and ci==2:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("U got me this time...Again?")

        print("Scores @ the end of this round are...")

        hs+=1

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==1 and ci==0:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("U got Better of me again!? WHAT?!...Come Again!")

        print("Scores @ the end of this round are...")

        hs+=1

        print("Me | Human")

        print(cs,"",hs)

    elif x==1 and ci==1:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("U got away this time...")

        print("Scores @ the end of this round are...")

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==1 and ci==2:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("U stand no chance against me...")

        print("Scores @ the end of this round are...")

        cs+=1

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==2 and ci==0:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("U can QUIT THOUGH...TAKE care")

        print("Scores @ the end of this round are...")

        cs+=1

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==2 and ci==1:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("Flukes happen...I will win anyway...!")

        print("Scores @ the end of this round are...")

        hs+=1

        print("Me | Human")

        print(cs,"  ",hs)

    elif x==2 and ci==2:

        print("I did : ",rps[ci])

        print("U did : ",rps[x])

        print("Your Luck is really with you this time,Computers dont have luck!")

        print("Scores @ the end of this round are...")

        print("Me | Human")

        print(cs,"  ",hs)

print("And the Winner is ...")

input("Press Any Key to Continue...")       

print("Me | Human")

print(cs,"  ",hs)

if cs>hs:

    print("Winner is :COMPUTER!")

    print("See I told Ya ...!You stand no chance against me")

    print("Good Game ,WELL PLAYED")

if cs<hs:

    print("Winner is :HUMAN!")

    print("U had the last Laugh ! I Accept My Defeat")

    print("Good Game ,WELL PLAYED")

if cs==hs:

    print("Its a DRAW...!")

    print("I did not Expect this much Competition From You!")

    print("Good Game ,WELL PLAYED")


Comments

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file