# John B. Schneider # CptS 111 # 1/24/2012 # HW 3a # A program to calculate the overall score in CptS 111. def main(): t1, t2, t3 = eval(input("Enter tests [t1, t2, t3]: ")) qz, lb, hw = eval(input("Enter quiz, lab, and homework [qz, lb, hw]: ")) t4 = float(input("Enter final exam: ")) bonus = float(input("Enter attendance bonus: ")) total = 0.1 * (qz + lb) + 0.15 * (t1 + t2 + t3 + hw) + 0.2 * t4 print("Final score, without bonus:", total) print("Final score, with bonus:", total + bonus) main()