# Name: NaNa Mathis # Problem description: Rock, Paper, Scissors import random user = input("Lets play! Choose your weapon (rock, paper, or scissors): ") comp = random.choice( ['rock','paper','scissors'] ) print('the user (you) chose', user) print('the comp (I) chose', comp) if user != 'paper' or user != 'rock' or user != 'scissors': print('please chose a valid weapon') elif user == 'paper' and comp == 'rock': print( 'noooo! you win!') elif user == 'paper' and comp == 'scissors': print('ha! winner winner chicken dinner @ me!') elif user == 'scissors' and comp == 'rock': print('who\'s the winner? it\'s me!') elif user == 'scissors' and comp == 'paper': print('you know what? winning and losing means nothing! so yeah you "won" but did you really? isn\'t life just about getting along and cooperation?') elif user == 'rock' and comp == 'scissors': print('well.. I guess you win.. :/') elif user == 'rock' and comp == 'paper': print('#winnning') else: print('uh ohhh.. it\'s a tie!')
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question