the first is:
i = 0
for i in len(names): (line #14)
name = names[i]
insurance_cost = actual_insurance_costs[i]
print("The insurance cost for"+" "+ names[i]+" "+"is"+" "+str(insurance_cost)+" "+"dollars")
result:
raceback (most recent call last):
File “script.py”, line 14, in
for i in len(names):
TypeError: ‘int’ object is not iterable
when I revised into:
or i in range(len(names)):
name = names[i]
insurance_cost = actual_insurance_costs[i]
print("The insurance cost for"+" "+ names[i]+" "+"is"+" "+str(insurance_cost)+" "+"dollars")
The result is done
So what makes the difference?
Thanks!