+ 12

I don't understand what the problem in this code

can someone help me, and take a look at my code? https://code.sololearn.com/c6PPmjd8BWI2/?ref=app

6th Jun 2018, 6:09 AM
I -_- D
I -_- D - avatar
6 odpowiedzi
+ 9
import random attack = ["rock", "paper", "scissors"] blow = input("choose your blow: ") print(blow) x = random.choice(attack) print("the computer choose:" + x) if (blow == "rock"): if x == "rock": print("draw, you have lucky day") elif x == "paper": print("you lose the game, try again.") elif x == "scissors": print("you won the game! are you ready to lose?") elif blow == "paper": if x == "paper": print("draw, so sad") elif x == "rock": print("you won!! 1-0 for you") elif x == "scissors": print ("you lose! I won, yahoo! 0.0") elif blow == "scissors": if x == "scissors": print("draw, next time you win, ha?") elif x == "paper": print("yoh won...Your chance of winning is 0.3333333333 ") elif x == "rock": print("you lose, don't give up! fight to win") print("like this game? +1") print("I would be happy to receive constructive comments, or whatever you want")
6th Jun 2018, 6:22 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 7
Raj Chhatrala good morning, thank you!
6th Jun 2018, 7:45 AM
I -_- D
I -_- D - avatar
+ 6
this code will work perfectly
6th Jun 2018, 6:22 AM
Raj Chhatrala
Raj Chhatrala - avatar
- 1
hgch
8th Jun 2018, 4:40 AM
Luis Angel Estacio Sabando
Luis Angel Estacio Sabando - avatar
- 2
hey
7th Jun 2018, 6:27 PM
m-amintje
m-amintje - avatar