Homework:
Create an array that represents a student's grades
The student wants to check which classes they have As in. Print the elements of the array above 90.0.
A new semester has started. Add a new axis so that the original array is now one row. Then, add a new row with six floats from 70.0 to 100.0.
Let’s say the student drops their fourth period class, so they can no longer view their grades. Remove that column of the array.
Lastly, they want to see how much they’ve improved from first to second semester. Print the difference between each of the columns.
Recourses:
Slides: https://docs.google.com/presentation/d/1bu_Z0OhYkfBKa-esKnCwN960jMUQzQk3ktbh_sMGZys/edit?usp=sharing Code: https://replit.com/join/sngzpindqi-shrav816
Contact Info:
shravyassathish@gmail.com (mentor)
kingericwu@gmail.com (TA)
felixguo41@gmail.com (TA)
import numpy as np
grades = np.array([[78.0,98.0,87.0,100.0,72.0]])
print(f"A Grades: {grades[(grades>90.0)]}")
newRow = np.array
grades = np.concatenate((grades, np.array([[79.0,92.0,83.0,99.0,100.0]])),axis=0)
print(grades)
grades = np.delete(grades,3,1)
print(grades)
difference = grades[1]-grades[0]
print(difference)