1. How long will it take to compute the chance of doubling 1 million dollars one dollar at a time?
Can someone help me with this
Using this code how can I use the stopwatch module to filll out this table
Use the stopwatch module to estimate how long your program runs.
stake - initial amount you start with
goal - the amount you want to end with (you will either lose it all or make your goal)
trials - the number of times you want to run the experiment - run the experiment 100 times to get a more accurate estimate of the probability. Do any empirical analysis using the doubling method. Start with the stake = 500 and goal 1000 and continue to double until the stake = 1000000.

![See the implementation of gambler.py . How long will it take to compute the chance of doubling 1 million dollars one dollar at a time?
2 gambler.py - C:\Users\ducep\OneDrive - The University of Montana\CSCI 151 Online\Module12\gambler.py (3.9.6)
File Edit Format Run Options Window Help
import stdio
import sys |
import random
def main():
= int (sys.argv[1])
= int (sys.argv[2])
int (sys.argv[3])
stake
goal
trials
wins
= 0
for t in range(0,trials):
cash = stake
while (cash > 0 and cash < goal):
if (random.random() < 0.5):
cash += 1
else:
cash
1
if (cash
stdio.writeln(str(wins) +
goal): wins += 1
==
wins of
+ str(trials) )
if
main
': main()
name
Ln: 2 Col: 11](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe2ec270a-5ed4-4aed-8cc7-15f8560395d2%2Fd8ae765c-7f57-442c-8e28-69cae26cae49%2Foez5var_processed.png&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 2 steps

So how long in seconds will it tak to compute 5000 dollars and then one milllion dollars








