Question
In programming assignment 12, you wrote a method that would run a single round of a random walk and return the number of steps that
In programming assignment 12, you wrote a method that would run a single round of a random walk and return the number of steps that it took for the walk to end.For example a walk to 10 might take anywhere from 10 to 200 or more steps.
Your question on this assignment is to take that method, and to determine the AVERAGE number of steps it takes.To start you are going to run your method from the first program 10000 times, and find the total number of steps needed and then divide it to find the average.So for example If I ask the computer what is the average number of steps for a size 20 walk,it might return back that the average number of steps is 397.33
So you need to ask the user what size walk they want to know about, then run the method with that number 10,000 (ten thousand) times, and find the average number of steps.Then print out that number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started