Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
snake water gun game
import random list=[["snake"],["water"],["gun"]] print("enter any one option 1. snake 2.water 2.gun") option=input() print("you entered",option) choice=random.choice(list) print("computer generated option",choice) if option == "snake" and choice=="water": print("you won") elif option=="water"and choice=="snake": print("you lose sanp ne tujhe pi liya") elif option=="snake" and choice=="gun": print("you lose banduk se mar gaya snake") elif option=="water" and choice=="gun": print("you won") elif option=="gun" and choice=="snake": print("you won") elif option=="gun" and choice=="water": print("you lose banduk dub gay") elif option=="snake" and choice=="snake": print("sorry,better luck next time") elif option=="water" and choice=="water": print("sorry,better luck next time") elif option=="gun" and choice=="gun": print("sorry,better luck next time") else: print("enter a valid option")
run
|
edit
|
history
|
help
0
Rasty profile
Insertion Sort
Prime Factorization of a Number
sept
Test
PyNoneOr
PyISP
1
Convert String to Lower Case
MBTI test ITA