IT 211 Final Exam Review Questions Part A: 1. b 2. c. 3. d 4. a 5. d 6. a 7. b 8. b 9. c 10. d 11. b 12. c 13. d Part B: 1. == == == == == == == == == == == == == == == == == == == == 2. Variable Trace: arr i dictionary --------------------------------+----+--------------------------- ["zero", "one", "two", "three"] { } 1 { 1: 'one' } 2 { 1: 'one', 2: 'two' } 3 { 1: 'one', 2: 'two', 3: 'three' } s ---------------------------------- {1: "one", 2: "two", 3: "three"} Output: {1: "one", 2: "two", 3: "three"} 3. Variable Trace: Output: Class B object b: //56// x y 5 6 -----+----- //109// 5 6 10 9 Part C: 1. Corrected Script: d = {"CHF": 0.9936, "CHY": 6.3984, "EUR": "0.8608", \ "GBP": 0.7516, "JPY": 109.05} target_currency = input("Enter desired currency: ") amount = float(input("Enter amount to exchange: ")) print("Currency amount in " + target_currency + \ " is " + str(round(d[target_currency] * amount, 2))) 2. Corrected Script: import json fin = open("grade-records.json", "r") json_string = fin.read( ) arr = json.loads(json_string) # Enter desired first and last name. desired_first_name = input("Enter desired first name: ") desired_last_name = input("Enter desired last name: ") # Initialize summary variables total_credit_hours = 0.0 total_grade_points = 0.0 # Print the GPA of the desired person. grade_dict = {'A': 4, 'B': 3, 'C': 2, 'D': 1, 'F': 0} for d in arr: if desired_first_name == d["first_name"] and \ desired_last_name == d["last_name"]: credit_hours = d["credit_hours"] grade = d["grade"] grade_points = grade_dict[grade] total_credit_hours += credit_hours total_grade_points += grade_points * credit_hours gpa = total_grade_points / total_credit_hours print(f"GPA: {round(gpa, 2)}")