i = 1
while i <= 10:
lst = ["snake", "water", "gun"]
computerInput = random.choice(lst)
# print("computer choice:",computerInput)
print("**************** Welcome To Snake-Water-Gun ***************************")
print("press 0 for exit")
userInput = input("Enter your choice:")
if userInput == '0':
confirm = input("are you sure press y or n:")
if confirm == 'y':
break
else:
# userInput = input("Enter your choice:")
if computerInput == 'snake' and userInput == 'water':
print("computer win, because computer choose", computerInput)
elif computerInput == 'snake' and userInput == 'gun':
print("you win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'water' or computerInput == "snake" and userInput == "snake" or computerInput == 'gun' and userInput == "gun":
print("noone win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'gun':
print("computer win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'snake':
print("you win, because computer choose", computerInput)
elif computerInput == 'gun' and userInput == 'snake':
print("computer win, because computer choose", computerInput)
elif computerInput == 'gun' and userInput == 'water':
print("you win, because computer choose", computerInput)
else:
if computerInput == 'snake' and userInput == 'water':
print("computer win, because computer choose", computerInput)
elif computerInput == 'snake' and userInput == 'gun':
print("you win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'water' or computerInput == "snake" and userInput == "snake" or computerInput == 'gun' and userInput == "gun":
print("noone win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'gun':
print("computer win, because computer choose", computerInput)
elif computerInput == 'water' and userInput == 'snake':
print("you win, because computer choose", computerInput)
elif computerInput == 'gun' and userInput == 'snake':
print("computer win, because computer choose", computerInput)
elif computerInput == 'gun' and userInput == 'water':
print("you win, because computer choose", computerInput)
i=i+1
0 Comments
Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only मराठी / English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....