print("ax^2 + bx + c = 0")
def ask_a():
a = int(input("""Please enter a:
a = """))
if a == 0:
print("Please input the correct number! \n")
a = int(input("""Please enter a:
a = """))
else:
try:
a == int(a)
print(f"a = {a}")
except ValueError:
print("Please input the correct number! \n")
a = int(input("""Please enter a:
a = """))
a = ask_a()
Error message:
Traceback (most recent call last):
File "c:\Users\jbtua\OneDrive\Desktop\wut is this\Personal Folder\Programming Projects\Python\blank.py", line 19, in <module>
a = ask_a()
File "c:\Users\jbtua\OneDrive\Desktop\wut is this\Personal Folder\Programming Projects\Python\blank.py", line 4, in ask_a
a = int(input("""Please enter a:
ValueError: invalid literal for int() with base 10: 'a'
I am still wondering what is the reason for this.