Below is my code which I am using to help me do my mathematics homework. When I run it, I get an 'invalid syntax' message with the variable 'y1' highlighted (look below for which one). I was wondering why, so when I looked up on this website similar titles nothing useful came up. So, what do I do? How do I stop y1 getting a syntax error?
import time
print("Hello, and welcome to the midpoint-finder-9001! Please insert the x1, y1, x2, and y2 coordinates when asked.")
x1=int(input("Please insert the x1 coordinate")
#This one below VVVV. I've even tried replacing it with random stuff like 'wef'
# but the variable name still gets highlighted. Even using # doesn't work as it
#just goes onto x2 and says that *that* also has a syntax error.
y1=int(input("Please insert the y1 coordinate")
x2=int(input("Please insert the x2 coordinate")
y2=int(input("Please insert the y2 coordinate")
print("Thank you! Now please wait while I find the midpoint!")
time.sleep(1)
ansx=(x1+x2)/2
ansy=(y1+y2)/2
print("Interpreting co-ordinates....")
time.sleep(0.5)
print("Drawing line....")
time.sleep(1)
print("Finding midpoint location....")
time.sleep(0.3)
print("Finding co-ordinates...")
time.sleep(0.4)
print("The midpoint has been found! The midpoint co-ordinate is",ansx,",",ansy,".")
yn=raw_input("Would you like to see the working out? (yes/no only!) ")
if yn.lowercase() == "yes"
print("The working out is:")
print("(",x1,"+",x2,") / 2")
print(",")
print("(",y1,"+",y2,") / 2")
else:
print("Ok then! Have a great day!")