python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a nd will create a file Fahrenheit.dat that contains the same temperatures (one per line, in the same order) in Fahrenheit
1 answer:
with open('celcius.dat', 'r') as fIn, open('fahrenheit.dat', 'w') as fOut:
for line in fIn:
fahrenheit = 9.0 / 5.0 * float(line) + 32
fOut.write("%.1f\n" % fahrenheit)
You can control the number of decimals in the formatting clause in the write statement.
You might be interested in
<span><span>Operating system: Windows 2000/XP </span><span>CPU: Pentium 4 1.5 GHz or Athlon XP 1500+ processor or higher </span><span>Memory: 384 MB RAM</span></span>
Nicephore Niepce created the first photograph.
Answer:
Explanation:
Some file formats are fiddly and difficult to open which also makes preservation harder.
Answer:
hello hru??
Explanation:
<h2>
<em><u>PLEASE</u></em> <em><u> MARK</u></em> <em><u> ME</u></em> <em><u> BRAINLIEST</u></em> <em><u> AND</u></em> <em><u> FOLLOW</u></em> <em><u> ME</u></em> <em><u> LOTS</u></em> <em><u> OF</u></em> <em><u> LOVE</u></em> <em><u> FROM</u></em> <em><u> MY</u></em> <em><u> HEART</u></em> <em><u> AND</u></em> <em><u> SOUL</u></em> <em><u> DARLING</u></em> <em><u> TEJASWINI</u></em> <em><u> SINHA</u></em> <em><u> HERE</u></em> <em><u> ❤️</u></em> </h2>
The first one is d the second one is true the third one is false