Answer:
Step-by-step explanation:
Below is the python code :
#using a for loop that will print the cost of each item
#first item cost is $15.0
item = [15.0]
tcost = 0.0
#for loop to print cost of each item and calculate total cost
for i in range(6):
tcost += item[i]
print('Cost of item ', (i+1), ' : $', item[i], sep = '')
item.append(item[i] + 2)
#print total cost
print('Total cost: $', tcost, sep = '')
print()
#Sequence formula to calculate the total cost
#total cost = n * ((first + last) / 2)
print('Calculating total cost using sequence formula')
tcost2 = 6 * ((15 + 25) / 2)
print('Total cost: $', tcost2, sep = ''