Ask Question
4 March, 21: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. 4 March, 21:55
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers