Stone Paper Scissors Game Simplest explanation tuit - kapish singh

Latest

WE Are Known To Provide Premium Content Which Helps User TO Get Best Information We Works In All Aspects Of Life so We Have All conten Fell free to ask A Powerful Blog Which keeps you updated about daily news and daily important notes important for UPSC perspective which enhances your knowledge with a tremendous amount of data in simple language keep like and subscribe to our feed and feel free to ask any question in the contact form

Search Bar

Friday 8 January 2021

Stone Paper Scissors Game Simplest explanation tuit

 python code:

lecture 4



stone = """                                                 _
; :
..,----------........ :````--.
: : ; :
.----------....... : ; : :
: : `:=======---,========= : :
: ; : ; ; `. : :
,=====.-----;====:` : : : : : :
: : ; : ; : : : : :
: : ; : : : ; : ; :
: : : : : : ; : : :
: : ; ; : :-: ;``: :
: ;-: :---````: :; : : :`--...
-`: : : : : :: : : :
: : : : : :: : : :
: : : : :.....-`:......----```` : :
:.--``` ;..---``` :...---```


"""
paper = """
_ __ __ _ _ __ ___ _ __
| '_ \ / _` | '_ \ / _ \ '__|
| |_) | (_| | |_) | __/ |
| .__/ \__,_| .__/ \___|_|
| | | |
|_| |_|
"""
SCISSORS = """
_ ,/'
(_). ,/'
__ ::
(__)' `\.
`\.
"""
import random
print(stone)
print(paper)
print(SCISSORS)
comp_ch = random.randint(1, 3)
our_ch= int(input("Press 1 for stone\n Press 2 for Paper \n Press 3 for SCISSORs\n"))
if (comp_ch==our_ch):
print("TIE ")
elif (comp_ch==1 and our_ch==2):
print("yo! ho you won! ")
elif (comp_ch==2 and our_ch==3):
print("Computer wins ")
elif (comp_ch==3 and our_ch==1):
print("you Won! ")
elif (comp_ch==3 and our_ch==2):
print("Computer wins! ")
elif (comp_ch==2 and our_ch==1):
print("computer wins!")
elif (comp_ch==1 and our_ch==3):
print("Computer Won! ")
else:
print("You! tried wrong inputs")

No comments:

Post a Comment