Let me preface this by saying not only have I never used Python before - I have never programmed ANYTHING before.
I have to write a python (script/program?) in python 3.*
The program must be able to have a user input 3 different unsurance company names, and their associated monthly costs.
Then the program must calculate the annual cost, as paying annual instead of monthly saves 3%
Then it must list the companys from most to least expensive, and show how much is saved by paying annualy
NOTE: Only allowed to use sequence. Not allowed to use selection or repletion
So far I have this
print ("This tool will compare insurance premiums for three companies")
name_A = (input("Please type the name of the first company, then press enter:"))
annual_A = int(input("Please enter the cost of the annual payment:"))
name_B = (input("Please type the name of the second company, then press enter:"))
annual_B = int(input("Please enter the cost of the annual payment:"))
name_C = (input("Please type the name of the third company, then press enter:"))
annual_C = int(input("Please enter the cost of the annual payment:"))
monthly_A = annual_A / 12 * 1.03
monthly_B = annual_B / 12 * 1.03
monthly_C = annual_C / 12 * 1.03
saving_A = annual_A * 0.03
saving_B = annual_B * 0.03
saving_C = annual_C * 0.03
print ("The monthly costs ordered most to least expensive are")
How do I A) make a list, and B) order it by value?