Share your repls and programming experiences

← Back to all posts
Rock! Paper! Scissors!
Lost0Soul (106)

Test your Rock-Paper-Scissor skill against the all-knowing random library.

All feedbacks welcome!

Please sugget me more programs to make so i can improve and you can keep enjoying!

Note:
For rock you can use either "r" or "rock"
For paper you can use either "p" or "paper"
For scissor you can use either "s" or "scissor" and if you are dumb, you can also use "ScIsSoR"
Made in collab with- https://repl.it/@sanduioan2

Comments
hotnewtop
Roar123 (447)

The graphics are really good! Here's an idea: assign consecutive numbers to each option, example rock : 1,paper : 2, scissors : 3. To avoid using an if statement for each possibility, you can compare the numerical difference between your guess and the computer guess. If it is either 1 or -2, then you win (with this list). 0 is tie and the computer wins the rest. Try it out!

shaunakg2011 (2)

there's a error on line 66: TabError: inconsistent use of tabs and spaces in indentation

Lost0Soul (106)

I never saw it but i reindented the whole file

Imthebestthe (106)

sorry, but looking at the code and the comments, It looks like you had a lot of potential in this piece of work. could you please just fix the IndentationError plz. thx

Lost0Soul (106)

@Imthebestthe Can you tell where you are getting indentation error?

Imthebestthe (106)

@Tanishqq
this is the new error I'm getting
File "main.py", line 66
elif cont == "n":
^
TabError: inconsistent use of tabs and spaces in indentation

Wilke000 (624)

There is an error on line 71, i think u need : after () @Tanishqq

Wilke000 (624)

But don't trust me, @IndyCarter is not expert

Lost0Soul (106)

You're wrong. sys.exit() is a function and not a loop or something that i need ":" after @IndyCarter

Wilke000 (624)

Ok but remember I said don't trust me! @Tanishqq

PravinPK (0)

why doesn't the program terminates after entering n

Lost0Soul (106)

@Tanishqq turns out i had forgot to put in sys.exit()

PAYTONPERKINS (0)

I lost because i put scissors instead of scissor lol

BlueComet (116)

If anyone doesn't want to play Rock Paper Scissors with me I know where to look

BlueComet (116)

Great job this is so cool keep up the good work! :D