1. Retrieve, complete, and print the exam1testrun.py code as described in lab. This is to be sure everyone is ready for the computer part of the exam on Wednesday morning.

2. Further explore the features of random walks:

a. Read the first page of the random walk project from a graduate course and John Hopkins University:

http://www.cs.jhu.edu/~joanne/cs112/assign/p2.pdf

b. Get the random walk program at the bottom of Section 4 of Chapter 8 https://runestone.academy/runestone/static/CSC2-140/MoreAboutIteration/RandomlyWalkingTurtles.html running in Idle.

Add a feature that counts how many steps the turtle makes and prints this when the turtle leaves the screen.

c. In another version of the random walk, suppose the turtle can go North, South, East, or West at each stop. After you get that working, enclose your code in a for loop that executes 10 times. After the 10th run, print out the shortest and longest path taken in the 10 runs.


Last modified: Tuesday, October 10, 2017, 12:49 PM