player = [[], [], [],[], [], [],[], [], [],[] ] for x in range (0,10): print (x + 1) player[x].append(int(input("Enter the length of the contract"))) player[x].append(float(input("Enter the value of the contract in millions of dollars"))) player[x].append(float(input("Enter the guaranteed money in millions of dollars"))) gSal16 = [] out1 = 0 gSal18 = [] out2 = 0 eVal16 = [] out3 = 0 out3num = 0 eVal18 = [] out4 = 0 anSal = [] out5 = 0 for x in range(0,10): gSal16.append((player[x][1])/(player[x][0])/16.0) gSal18.append((player[x][1])/(player[x][0])/18.0) eVal16.append((1 - (player[x][0] * .03)) * player[x][1] + player[x][0] * .03 * player[x][2]) eVal18.append( (1 - (player[x][0] * .03375)) * player[x][1] + player[x][0] * .03375 * player[x][2]) anSal.append( float(player[x][1]) / player[x][0]) g16low = 10000000 g16high = 0 g18low = 10000000 g18high = 0 e16high = 0 e18sum = 0 for x in range(0,10): if gSal16[x] > g16high: g16high = gSal16[x] if gSal16[x] < g16low: g16low = gSal16[x] if gSal18[x] > g18high: g18high = gSal18[x] if gSal18[x] < g18low: g18low = gSal18[x] if eVal16[x] > e16high: e16high = eVal16[x] out3num = x + 1 e18sum += eVal18[x] out1 = int(1000000 * (g16high - g16low)) out2 = int(1000000 * (g18high + g18low)/2.0) out3 = int(1000000 * e16high) out4 = int(1000000 * e18sum/10.0) anSal.sort() out5 = int(1000000 * (anSal[4] + anSal[5])/2.0) print ("\n\n\n") print ("OUTPUT") print ("1. " + str(out1)) print ("2. " + str(out2)) print ("3. " + str(out3) + " by #" + str(out3num)) print ("4. " + str(out4)) print ("5. " + str(out5))