hi im new to coding this is only my seventh or so class for python!
today during my class we were assigned to make a simple distance between the points calculator but something went wrong with my code it seems to be skipping over the if and going straight into the else so i think something may be wrong with the if itself but i'm not certain and don't have the necessary knowledge to know just yet
today during my class we were assigned to make a simple distance between the points calculator but something went wrong with my code it seems to be skipping over the if and going straight into the else so i think something may be wrong with the if itself but i'm not certain and don't have the necessary knowledge to know just yet
#This Program will ask the user to enter two points in the form #(x1,y1) and (x2,y2) import math x1 = float(input("Enter X1:")) y1 = float(input("Enter Y1:")) x2 = float(input("Enter X2:")) y2 = float(input("Enter Y2:")) #calculate the distance between the points theDistance = math.sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)) a = theDistance b = input("Your Guess?") if a == b: print("Your Guess is Correct") print(theDistance) else: print("Your Guess is Incorrect") print(theDistance)