Ask Question
19 December, 09:47

I want to write a program in Python which computes and. prints a table of Celsius temperatures and the Fahrenheit equivalents every. 10 degrees from 0C to 100C. I spent a lot of time on it and prepared the following code:. def main () :. for i in range (0,11) :. celsius = i * 10. fehrenheit = ((9.0/5.0) * (celsius)) + 32. print celsius,"C is equal to", fehrenheit,"F"

and it works. But I think I should have given a range of 0-100 instead right? I mean i manually found "every

10 degrees from 0C to 100C" but I should have let the program find it right?

+2
Answers (1)
  1. 19 December, 13:30
    0
    or celsius in range (0,101,10) : fahrenheit = ((9.0/5.0) * (celsius)) + 32 print celsius,"C is equal to", fahrenheit,"F"
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “I want to write a program in Python which computes and. prints a table of Celsius temperatures and the Fahrenheit equivalents every. 10 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers