Hello, I have finished Python Lists: Medical Insurance Project-extra for calculate the different.
My code is repeating, I don’t know to make simple
Any help would be be greatly appreciated
# calculate the different
maria_calculate_the_different = [(estimated_insurance_data[0][1]) - (new_insurance_data[0][1])]
print("Maria: " + str(maria_calculate_the_different))
rohan_calculate_the_different = [(estimated_insurance_data[1][1]) - (new_insurance_data[1][1])]
print("Rohan: " + str(rohan_calculate_the_different))
valentina_calculate_the_different = [(estimated_insurance_data[2][1]) - (new_insurance_data[2][1])]
print("Valentina: " + str(valentina_calculate_the_different))
akira_calculate_the_different = [(estimated_insurance_data[3][1]) - (new_insurance_data[3][1])]
print("Akira: " + str(akira_calculate_the_different))
full code here:
Is there something specific you are stuck on in this project?
nope, code is working
I mean if there any suggestion, so my code for “for calculate the different” will be simple