Write a Python program to convert temperatures to and from celsius, fahrenheit.
c = (5/9) * (F-32);
f = (9/5)*C (+32);
temp = input('Enter the temperature you wants to convert : ')
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('Enter the temperature with proper convention; F / C'
quit()
print("The temperature in ", o_convention, "is", result, "degrees")
NameError: name ‘o_convention’ is not defined. Is it necessary to define the ‘o_convention’ ?