Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.
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 hope this was helpful. Please come back whenever you need more information or answers to your queries. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. Get the answers you need at Westonci.ca. Stay informed by returning for our latest expert advice.