Who knew coding could be so...addicting! Here I created two separate betting games using Python and Visual Studio Code.
To start this project off I needed to write a few functions to inform the player of what is happening.
Later, I included the main function which determines the amount of money, if the bet is valid, card number generator,etc. The main component was importing a random number generator and using this to drive the bets.
This is how the overall return of the code looks from an end-user perspective.
Watch me play against the computer!
Again, one of the first steps was to import random to allow Python to be able to randomly generator a number from a given range. I then included the players bet amount and their heads or tails choice.
When the game starts, the return will explain how much each player has, the result, and asks if the player would like to continue.
This is how the overall return of the code looks from an end-user perspective.
Watch me play against the computer!
These were really fun projects and I learned so much about how blueprints can translate to direct Python code!
Code Cleanup: Microsoft Copilot