@@ -0,0 +1,1322 @@
+# Define a procedure, total_enrollment,%0A# that takes as an input a list of elements,%0A# where each element is a list containing%0A# three elements: a university name,%0A# the total number of students enrolled,%0A# and the annual tuition fees.%0A%0A# The procedure should return two numbers,%0A# not a string, %0A# giving the total number of students%0A# enrolled at all of the universities%0A# in the list, and the total tuition fees%0A# (which is the sum of the number%0A# of students enrolled times the%0A# tuition fees for each university).%0A%0Audacious_univs = %5B%5B'Udacity',90000,0%5D%5D%0A%0Ausa_univs = %5B %5B'California Institute of Technology',2175,37704%5D,%0A              %5B'Harvard',19627,39849%5D,%0A              %5B'Massachusetts Institute of Technology',10566,40732%5D,%0A              %5B'Princeton',7802,37000%5D,%0A              %5B'Rice',5879,35551%5D,%0A              %5B'Stanford',19535,40569%5D,%0A              %5B'Yale',11701,40500%5D  %5D%0A%0Adef total_enrollment(unis):%0A    cost, students = 0, 0%0A    for uni in unis:%0A        students += uni%5B1%5D%0A        cost += uni%5B1%5D * uni%5B2%5D%0A    return (students, cost)%0A%0Aprint total_enrollment(udacious_univs)%0A#%3E%3E%3E (90000,0)%0A%0A# The L is automatically added by Python to indicate a long%0A# number. If you are trying the question in an outside %0A# interpreter you might not see it.%0A%0Aprint total_enrollment(usa_univs)%0A#%3E%3E%3E (77285,3058581079L)%0A    %0A

Create 03.py