students = [('Alice', 2016), ('Bob', 2017), ('Charlie', 2017)] def print_student_years(student_list): '''print the class year of each student in students''' for (name, year) in student_list: print("student name is " + name + ", year is " + str(year)) def print_list(some_list): '''print out the indices and corresponding elements of some_list''' for i in range(0, len(some_list)): print("index ", i, " is ", some_list[i]) grades = [74, 83, 76, 88, 80] def scale_grades_copy(grade_list): '''returns a copy of the grades in grade_list scaled up by 10%''' scaled_grades = [] for grade in grade_list: scaled_grades.append(round(grade * 1.1)) return scaled_grades def scale_grades(grade_list): '''scale the grades in grade_list up by 10%''' for i in range(0, len(grade_list)): grade_list[i] = round(grades[i] * 1.1) import time def print_mult_table(): '''print out a multiplication table from 1 to 4''' for row_num in range(1, 10): for col_num in range(1, 10): print(col_num * row_num, end='\t') time.sleep(0.5) print() # end the current row