0

How to print strings +numbers

I have a problem with this thing,and I don't know how to fix the "c" word that I had defined before: c=0 while True: print("while" 'c' "degree Celsius,\nit is" '((9/5)*c+32)' "degree Fahrenheit!!!") c=c+1 if c>=100: print("out of calculation") break print("finished")

31st Dec 2017, 9:20 AM
Nathan Lo
Nathan Lo - avatar
1 Answer
+ 5
You should do it like this: print("while", c, "degree Celsius,\nit is", ((9/5)*c+32), "degree Fahrenheit!!!") This will print the value of c and not the letter c.
31st Dec 2017, 10:03 AM
Tim Thuma
Tim Thuma - avatar