0

Help please! Python code not working!

https://code.sololearn.com/cFM9Pa6TZn1R/# So I made a rock paper scissors game, but it's not even taking the input and I just don't know what's wrong. Can someone help?

7th Nov 2019, 8:29 PM
Ville Nordström
Ville Nordström - avatar
3 odpowiedzi
+ 3
Line 42 and 43: You forgot the parentheses after the function calls. And: randint is a function, you need to use parentheses here too instead of [].
7th Nov 2019, 8:50 PM
HonFu
HonFu - avatar
+ 3
Thank you guys :) The game works now, but the player_wins or the computer_wins won't print out and the game never ends edit: I just indented the "do you wish to continue loop" to be in the While True loop and now it's all working :)
8th Nov 2019, 5:27 AM
Ville Nordström
Ville Nordström - avatar
+ 1
Ok, that's not so bad. This C_Choice = random.randint[1,3] Has to be C_Choice = random.randint(1,3) Here are missing 2x "( )" at the end of lines: User_Choice = User_Option Computer_Choice = Computer_Option And the two lines at the end of your code will never run. Something like this is not possible. Maybe try to put your two functions together to only one funktion. And then call this funktion after the user gives a "yes" on the question for replay.
7th Nov 2019, 9:23 PM
Coding Cat
Coding Cat - avatar