""" File: final_avg.py Purpose: Compute the final average of a student in CS 110-03 Run: python final_avg.py Input: Student's scores Output: His or her final average """ hwk_pct = 0.15 p12_pct = 0.06 p345_pct = 0.08 mt_pct = 0.12 exam_pct = 0.25 hwk_str = raw_input("Enter your homework average\n") hwk = float(hwk_str) p1 = float(raw_input("Enter your p1 score\n")) p2 = float(raw_input("Enter your p2 score\n")) p3 = float(raw_input("Enter your p3 score\n")) p4 = float(raw_input("Enter your p4 score\n")) p5 = float(raw_input("Enter your p5 score\n")) mt1 = float(raw_input("Enter your mt1 score\n")) mt2 = float(raw_input("Enter your mt2 score\n")) exam = float(raw_input("Enter your exam score\n")) avg = hwk_pct*hwk + p12_pct*(p1+p2) + p345_pct*(p3+p4+p5) +\ mt_pct*(mt1+mt2) + exam_pct*exam print "Final average is", avg