You are on page 1of 1

#----------------------------#

# Greg Practice Assignment 2 #


#----------------------------#
# Note - with the actual assignment, you'll be required for each one to be a dif
ferent function,
# not just the final product, but copy/pasting previous code and modifying it is
fine as long as
# you wrote the previous code in the first place.
- Function 1:
Make a program that requests two integers from the user based on points on the m
ap provided, and draws a black line between said points. The program is then to
show the user the finished map.
- Function 2:
Expand on the above program. Instead of simply drawing one line, first, the prog
ram will ask the user how many places they will be visiting. Then, it will ask w
here the user is going, and draw a line between those two points. It will loop a
sking and drawing the line until the number of places going is met. Make sure to
redraw the map every time a new line is added.
- Step 2:
Add validation to the numbers entered for the places going. Ensure the program t
hrows a valid error and returns to the number input when the number input isn't
valid, or is outside the range of numbers available. Whether you validate in the
code or use a seperate function is entirely up to you.
- Step 3:
Add further validation so you can't draw back over a line. For example, the user
can't input 3, 4, 3. On top of this, the same number cannot be input twice in a
row. Additionally, at the end of loop, save the picture to a location on the co
mputer.

You might also like