Explore a vast range of topics and get informed answers at IDNLearn.com. Get the information you need from our community of experts, who provide detailed and trustworthy answers.
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 presence here. Keep sharing knowledge and helping others find the answers they need. This community is the perfect place to learn together. IDNLearn.com is committed to providing the best answers. Thank you for visiting, and see you next time for more solutions.