Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use MATLAB only Table Part 1 For each of the forty largest countries in the worl

ID: 3184254 • Letter: U

Question

Use MATLAB only

Table Part 1 For each of the forty largest countries in the world (according to 1990 population figures), data are given for the country's life expectancy at birth, number of people per television set, and number of people per physician. The data is stored a table tvPLE in the mat file Television_Physician_and_Life_Expectancy Write a script that has two subfunctions: 1) findMinimumRecord that find the minimum life expectancy in the dataset, and the extract the accompanying record, and 2) ExtractRecordBasedOnCountry to find the record given the name of a country, and extract the record. The main script should call the two functions as indictated in the Learner Template. The countries in the table are Argentina" Bangladesh "Brazil' "Canada China Colombia' Egypt Ethiopia France Germany India Indonesia Iran Italy Japan Kenya Korea, North Korea, South Mexico Morocco Myanmar (Burma)Taiwan Pakistan Peru' Philippines 'Poland Romania Russia South Africa Spain Sudan Tanzania Thailand Turkey Ukraine United Kingdom "United States Venezuela Vietnam Zaire For example load Television Physician and Life Expectancy record-ExtractRecordBasedOnCountry (tvPLE, 'South Africa') record = 1x6 table Country Life_expct Pple_per_telev Pple_per_phys Female_1f_expct Male_1f_expct South Africa 64 1340 67 61

Explanation / Answer

from time import localtime, strftime files = open("grades.dat") request = open("requests.dat", "w") lists = files.readlines() grades = [] for i in range(len(lists)): grades.append(lists[i].split(",")) cont = "y" while cont == "y" or cont == "Y": answer = raw_input("Please enter the Student I.D. of whom you are looking: ") for i in range(len(grades)): if answer == grades[i][0]: print grades[i][1] + ", " + grades[i][2] + (" "*6) + grades[i][0] + (" "*6) + grades[i][3] time = strftime("%a, %b %d %Y %H:%M:%S", localtime()) print time print "Exams - " + grades[i][11] + ", " + grades[i][12] + ", " + grades[i][13] print "Homework - " + grades[i][4] + ", " + grades[i][5] + ", " + grades[i][6] + ", " + grades[i][7] + ", " +grades[i][8] + ", " + grades[i][9] + ", " + grades[i][10] total = int(grades[i][4]) + int(grades[i][5]) + int(grades[i][6]) + int(grades[i][7]) + int(grades[i][8]) + int(grades[i][9]) + int(grades[i][10]) + int(grades[i][11]) + int(grades[i][12]) + int(grades[i][13]) print "Total points earned - " + str(total) grade = float(total) / 550 grade = grade * 100 if grade >= 90: print "Grade: " + str(grade) + ", that is equal to an A." elif grade >= 80 and grade < 90: print "Grade: " + str('%.2f' %grade) + ", that is equal to a B." elif grade >= 70 and grade < 80: print "Grade: " + str('%.2f' %grade) + ", that is equal to a C." elif grade >= 60 and grade < 70: print "Grade: " + str('%.2f' %grade) + ", that is equal to a D." else: print "Grade: " + str('%.2f' %grade) + ", that is equal to an F." request.write(grades[i][0] + " " + grades[i][1] + ", " + grades [i][2] + " " + time) request.write(" ") print cont = raw_input("Would you like to search again? ") if cont != "y" or cont != "Y": print "Goodbye."
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote