ch=input("Press 1 (for Farenheit to Celcius)\n or 2 (for Celcius to Farenheit): ")
q=float(input(“Enter the F or C Value”))
if(ch=='1'):
ans=((q-32)*5/9)
elif (ch=='2'):
ans=(q*(9/5))+32
print(“The converted value is ”, ans)
To develop from within
ch=input("Press 1 (for Farenheit to Celcius)\n or 2 (for Celcius to Farenheit): ")
q=float(input(“Enter the F or C Value”))
if(ch=='1'):
ans=((q-32)*5/9)
elif (ch=='2'):
ans=(q*(9/5))+32
print(“The converted value is ”, ans)