def milesToFeet(miles):
return int(miles*5280)
def main():
print("\n===============")
print("Hike Calculator")
print("===============\n")
miles = input("enter number of miles here:\n")
checkMiles = isinstance(miles,(int, float))
print(checkMiles)
if checkMiles == False:
miles = input(f"\nplease enter a number\n")
checkMiles = isinstance(miles, float) or isinstance(miles, int)
milesToFeet(miles)
feet = milesToFeet(miles)
print(f"you have walked {feet} feet\n")
choice = input("would you like to try again? (y/n)\n")
if choice == ("y"):
main()
elif choice == ("n"):
exit()
else:
while True:
choice = input("please enter either y or n\n")
if choice == ("y"):
main()
elif choice == ("n"):
exit()
else:
continue
main()
ok so in the fifth line of the main function I tried using the "isinstance" function to check to see if the user entered a number or not but for some strange reason it is always coming out as false reguardless if i enter a number or not.
I know there is something else breaking right after that but this is the part im stuck in now lol
