If you want to learn how to do interactive games using Python, then this is great start for you.
In this code, You will learn how to do the quick game Rock, Paper, Scissors using Python.
- Open up Idle
- Then press File and after that New
- Then type the code onto the file
- Then press Run and after that Run Module
- Then type either Rock, Paper or Scissors into the input
- Make a new file and type the code
- Click on the Terminal button, then New Terminal
- Type 'python' (the filename of your code).py, into the terminal
- Then type whatever you want...
-
The first thing it should say is: Rock, Paper, Scissors?
-
Then if you lose it should say 'Welp. You lost'
-
If you win it should say 'Woohoo you win' or 'AYY! you won'
-
If you play the same move it should say 'Haha! You played the same move.'
-
And if you don't put either of those inputs it should say 'Are you sure you entered that...'