11/29/2023 0 Comments Simple roulette wheel selection python![]() This is a style nit-pick, but most people would have spaces beside the operator, so it'd be print('-' * 50) while play:Ī naming nit-pick, but it'd be helpful to have a more descriptive name like game_is_playing, since play can be kind of ambiguous. Print('Initial balance:', initial_balance) Replay = input('Do you want to play again ? Type yes or no :)') Print('Your balance is now', balance_final) Guess_number = float(input('Guess number? '))īalance_final = initial_balance + sum(gains) Print("You can't bet 0, negative amount of money or money that you don't have !") Print('Enter a numeric amount, like 100 or 40.50.')īet = float(input('How much money do you want to bet on this single roulette turn? ')) Print("You can't bet 0 or negative amount of money !") Initial_balance = float(input('With how much money do you want to play ? ')) I was supposed to create a simple roulette game.Ĭould someone tell me if my code is any good ? import random I'm currently reading a book to learn Python and I just completed the first project. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |