So I'm still struggling to understand what actually happens when the parentheses of a function that takes in an argument is missing. In this case, I noticed that when the convention.upper brackets are missing, the 3rd block of the if statement code (ie input proper convention) is runned and then the kernel dies although the intended output is correct and works. Can anyone explain to me what happens if the brackets are missing?
temp = input("Input the temperature you like to convert? (e.g., 45F, 102C etc.) : ")
degree = int(temp[:-1])
i_convention = temp[-1]
if i_convention.upper() == "C":
result = int(round((9 * degree) / 5 + 32))
o_convention = "Fahrenheit"
elif i_convention.upper() == "F":
result = int(round((degree - 32) * 5 / 9))
o_convention = "Celsius"
else:
print("Input proper convention.")
quit()
print("The temperature in", o_convention, "is", result, "degrees.")