Few games written in Python3
We all play games. But the joy to play a game which you coded for yourself is incomparable.
While coding for these games, I learned a lot about Python3.
A few of the games are:
GuessTheNumber:
The computer has already selected a number between 0 to 20. A user is supposed to guess which number is that. If the user selects 10, the computer will provide a feedback if the computer's number is greater than or less than or equal to 10. The user can thus give further inputs and reach the correct number.
RockPaperScissors:
A user is supposed to give input of either, Rock or Paper or Scissors. The computer has also selected one of the options from these three. Once the user provides the input, the computer determines who won.
Rock >> Scissors | Paper >> Rock | Scissors >> Paper
Fun Fact(Shhhhh....)-- Before developing this game, I did not knew how to play Rock Paper Scissors. 😞
SineCosine:
This is not actually a game but the way to plot sine and cosine curves.
Developing these games was just a short term objective. The long term objective was to learn Python3.
By developing these games, I learnt to:
- Define a function
- Take user input in Python3
- Write a While Loop
- Boolean Logic- if-else
- Handle Strings, Tuples and Dictionaries