A simple slot machine using python
I know this may not be the best slot machine , but from a beginner pov who is just curious about making projects using python and is just bored learning all the theoritical concepts and want to make something based on existing learning , this will be a great start.
This project give you a better understanding of functions,loops,contitionals,string operations etc...
what is this project all about?
- The user deposit amount into the slot machine
- The number of lines he/she wants to bet (horizontal reels), if all the characters matches in that particular reel, the user will be rewared with prize money.
- set a bet amount. This will be multipilied with number of lines the user bets.
- a function get_slot_machine_spin() will spin the slot machine , using python random module, random character will be generated
- displays the characters of the slot machine , in a matrix manner
- checks if the character in entire row gets matched. if matched the character value will be multiplied with the bet amount of each line, and gives you the winning amount.
- repeatedly ask the user if he want to play or not. if want to quit will return with left amount.
REFERENCE:
- python docs
- w3schools
- programiz