0

Why my outputs are printing double and in the middle of my output there's an little error but still printing outout,why?

while True: print("Select the categories:\n") converter=input("\t1.Celsius to Fahrenhiet\n\t2.Celsius to Kelvin\n\t3.Fahrenhiet to Celsius\n\t4.Fahrenhiet to Kelvin\n\t5.Kelvin to Celsius\n\t6.Kelvin to Fahrenhiet\n\t7.'quit' to end the program\n") if converter =='7': print("You wished to End") if converter in ('1','2','3','4','5','6'): temp=float(input("Enter the temperature:\n")) if converter =='1': result=((9*temp)+160) print("Celsius to Fahrenhiet="+str(result)) elif converter =='2': result = (temp+273) print("Celsius to Kelvin="+str(result)) elif converter =='3': result =((5*temp)-160)/9 print("Fahrenhiet to Celsius="+str(result)) elif converter =='4': result =((5*temp)+2297)/9 print("Fahrenhiet to Kelvin="+str(result)) elif converter =='5': result =(temp-273) print("Kelvin to Celsius="+str(result))

15th May 2020, 4:54 AM
Tanjir Ahmed
Tanjir Ahmed - avatar
5 ответов
+ 2
Becoz it is a infinity loop Try out this 👇👇👇👇👇 https://code.sololearn.com/cX2313xvHm5A/?ref=app
15th May 2020, 5:01 AM
Abhay
Abhay - avatar
0
Abhay tnx man..can plz explain a little behind the reason...I have never seen or thought something like that.
15th May 2020, 5:10 AM
Tanjir Ahmed
Tanjir Ahmed - avatar
0
Simple Sololearn compliler is not sufficient for multiple input and in fir while loop it ask for multiple input even after showing ur result Ur code is perfect Try to run it on pydroid Download pydroid for Play store Stay home Stay safe
15th May 2020, 5:15 AM
Abhay
Abhay - avatar
0
Abhay Thank you so much
15th May 2020, 5:24 AM
Tanjir Ahmed
Tanjir Ahmed - avatar