Share your repls and programming experiences

← Back to all posts
Rock, Paper, Scissors!
SilvermoonCat (435)

New REPL I’m Working On!

Can anyone tell me why it’s not running infinetly?

also, this is something I made for fun. Hope you like it—SilvermoonCat

OldWizard209 (1531)

You can make a list of numbers like:

nums = ['1', '2', '3', '4', '5']

and then on line 22 you can do:

while rps in nums:
    if rps == 1 :

    org = input("What do you choose? Rock paper or scissors\033[1;36m ")

Then the rest of the code and to finish up:

    print("INVALID INPUT")

And then the program is going to run again. This way, only if the user enters a number from 1 to 5 , the program will run. Otherwise it will run again. Also if you want, you can make another while loop which will run for the rock paper scissors (and maybe make a list of rock, paper, scissors choices). Again this is just a suggestion, you can do whatever you like. Hope this helps you. Tell me if you want more help :)

XanderK20 (9)

Hey this is great! Can I make a repl similar to this?