Question: I'm trying to create a roulette program in python . The user should enter the amount of money they start with, number of spins they

I'm trying to create a roulette program in python. The user should enter the amount of money they start with, number of spins they will play, and the number of dollards on each spom. They will then choose their strategy choice. After choosing, the program should output wins, losses, ending bank, and net winnings.

Example Sim: Enter money you start with: 1000 Enter the # of spins to play: 1000 Enter money to bet for each spin: 1 Choose one strategy: - Bet on a (s)ingle number (pays 35 to 1) - Bet on (e)ven or odd numbers (pays 1 to 1) - Bet on a (d)ozen numbers (pays 2 to 1) Enter your strategy decision (s, e, d): d Enter 1 to bet on numbers 1-12, 2 for numbers 13-24, or 3 for numbers 25-36: 3 After 1000 spins Wins: 316 (31.60%) Losses: 684 (68.40%) Ending bank: 948 Net winnings: $-52

Code I'm starting with:

import random

def roulette(): rolls = 0 moneyinput = int(input("Enter the number of dollars you start with: ")) spininput = int(input("Enter the number of spins you will play: ")) eachspin = int(input("Enter how many dollars you will bet for each spin: ")) print("Choose one of the following strategy choices") while(True): s = rolls += 1 dice = random.randint(1, 6) if total == userinput: break else:

roulette()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!