Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Discover precise answers to your questions from a wide range of experts on our user-friendly Q&A platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.
Sagot :
Answer:
float
Explanation:
item[ ] is an array of strings.
Since 0.4 is added to it, item[1] obviously has to be converted to a float before the addition can take place.
Answer:
Float
Explanation:
Complete the code.
import csv
inFile = open ("one.txt","r")
outFile = open("another.txt", "w")
myReader = csv.reader(inFile)
for item in myReader:
aWord = item[0]
aNumber = float(item[1]) + 0.4
line = aWord + "," + str(aNumber) + 'Float'
'
outFile.write(line)
We appreciate your visit. Hopefully, the answers you found were beneficial. Don't hesitate to come back for more information. We hope this was helpful. Please come back whenever you need more information or answers to your queries. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.