Stone paper scissoe project - 7 th computer

 Stone paper scissor with computer --



To make this program you should simpaly need to know about basics of python programminf it seems to be veery difficult but is is not so ,m its very easy with some common sense and littel hardwork and faliurs .


Code is as below -- 
import random
 print('''Instructions
         Type (P) for choosing paper
         Type (S) for choosing Stone
         Type (C ) for choosing scissor ''')
    userwicomp=input ( "Enter your name:- ")
    print ( "Welcome to computer mode",userwicomp)
    userwcomp=input ("Enter your choice :-")
    S= "Stone"
    P="Paper "
    C="Scissor "
    mylist = ["P", "C", "S"]
    comp= (random.choice(mylist))
    print ("You chooses ",userwcomp)
    print ("computer chooses ",comp)
    if userwcomp==comp:
        print ( " Game is in tie you can again !!!!")
    elif userwcomp=="P" and comp=="S":
        print ("You Win!!")
    elif userwcomp == "S" and comp =="C":
        print ("You Win!!")
    elif userwcomp =="C " and comp== "S":
        print ("You Win!!")
    else:
        print ("Computer win  . Youshould try again ")



0 Comments