the program works fine altogether but in the end it declares 'I am clueless here' (which it shouldnt) because all conditions written before are true..
I expect it shouldnt declare 'i am clueless here' as I have written all conditions.
"""In this program, you will play ROCK, PAPER AND SCISSORS with our very own computer. Lets see if you can win this""" from random import choice from time import sleep def prompt_user(): user_choice= str(raw_input('Please choose from Rock, Paper or Scissors; You must choose only one ')) user_choice= user_choice.upper() if user_choice == 'ROCK' or user_choice=='PAPER' or user_choice== 'SCISSORS': print 'you choose ' + str(user_choice) return user_choice else: return prompt_user() def computer_action(): computer_choice= ['ROCK', 'PAPER', 'SCISSORS'] computer_choice = choice(computer_choice) print 'computer is thinking' sleep(3) print 'computer chose %s '% (computer_choice) return computer_choice guess_1= prompt_user() guess_2= computer_action() if guess_1 == 'ROCK' and guess_2== 'ROCK': print ' its a damn tie' if guess_1== 'PAPER' and guess_2== 'PAPER': print 'its a damn tie' if guess_1== 'SCISSORS' and guess_2== 'SCISSORS': print 'its a damn tie' if guess_1== 'PAPER' and guess_2== 'ROCK': print 'You won buddy..' if guess_1== 'SCISSORS' and guess_2== 'PAPER': print 'You won. way to go' if guess_1== 'ROCK' and guess_2=='SCISSORS': print 'You won' if guess_1== 'PAPER' and guess_2== 'SCISSORS': print 'You lost' if guess_1== 'ROCK' and guess_2== 'PAPER': print 'You lost' if guess_1== 'SCISSORS' and guess_2=='ROCK': print 'you lost' else: print 'I am clueless here...'