Hi, my situation is hard to explain, so I might as well explain it in depth.
I am trying to create a program where users can enter (Cartesian) coordinates of the points of a shape. Then, the program uses a vector (entered by the user) to translate the shape using its coordinates. Hopefully you understand what I'm saying. If you don't know the process/rule for translating shapes using their coordinates, you probably can't help me much because it will help if you understand what I'm trying to do.
The process starts like this:
I ask the user how many points make up their shape (what type of polygon they are translating).
Then I ask them to enter the x,y coordinates for each point. Here's the beginning code and the code for one point-saving procedure:
print('View saved points with "points".')
print()
print("Number of points:")
inputX = int(input())
if inputX < 3:
print("Invalid.")
if inputX > 5:
print("Invalid.")
print("Input points: x,y")
inputZero = input()
split = inputZero.split(",")
xZero,yZero = split[0],split[1]
print("("+xZero+","+yZero+") saved. Input another point.")
Now, for each point-saving section, I want the user to also, instead of entering a point's coordinates, be able to input a string like "points" and it will print all of the points saved. The problem is, I don't know how I can have integers act as coordinates for the points and have a string like "points" act like a string I can use an if statement like this (inputZero is the input for point coordinates in one of those point-saving sections):
if inputZero == "points":
print("#All of the points previously entered")
Every response is appreciated,
Thanks