Examine showPlot2 in ps2.py, which takes in the same parameters as showPlot1. Your job is to examine the code and figure out what the plot produced by the function tells you. Try calling showPlot2 with appropriate arguments to produce a few plots. Then, answer the following 3 questions.Which of the following would be the best title for the graph?
A. Percentage Of Room That A Robot Cleans
B. Time It Takes Two Robots To Clean 80% Of Variously Sized Rooms
C. Time It Takes Two Robots To Clean 80% Of Variously Shaped Rooms
D. Time It Takes 1 - 10 Robots To Clean 80% Of A Room
E. Percentage Of Variously Sized Rooms That A Robot Cleans
F. Percentage Of Variously Shaped Rooms That A Robot Cleans
查看答案
Which of the following would be the best y-axis label for the graph?
A. Time-steps
B. Percentage Cleaned
C. Aspect Ratio
D. Number of Robots
E. Distance Travelled
Examine showPlot1 in ps2.py, which takes in the parameters title, x_label, and y_label. Your job is to examine the code and figure out what the plot produced by the function tells you. Try calling showPlot1 with appropriate arguments to produce a few plots. Then, answer the following 3 questions.Which of the following would be the best title for the graph?
A. Percentage Of Room That A Robot Cleans
B. Time It Takes 1 - 10 Robots To Clean 70% Of A Room
C. Percentage Of Room That 1 - 10 Robots Clean
D. Time It Takes 1 - 10 Robots To Clean 80% Of A Room
E. Time For Robots To Clean Varying Percentages Of A Room
F. Area Of Room That 1 - 10 Robots Clean
Which of the following alterations (Code Sample A or Code Sample B) would result in a deterministic process?import random # Code Sample A mylist = [] for i in xrange(random.randint(1, 10)): random.seed(0) if random.randint(1, 10) > 3: number = random.randint(1, 10) if number not in mylist: mylist.append(number) print mylist # Code Sample B mylist = [] random.seed(0) for i in xrange(random.randint(1, 10)): if random.randint(1, 10) > 3: number = random.randint(1, 10) mylist.append(number) print mylistCheck one, none, or both.
A. Code Sample A
B. Code Sample B
Is the following code deterministic or stochastic?import random mylist = [] for i in xrange(random.randint(1, 10)): random.seed(0) if random.randint(1, 10) > 3: number = random.randint(1, 10) mylist.append(number) print mylist
A. Deterministic
B. Stochastic