Page 1 of 1

In python what is wrong with this code? we have to make a class by the name of the student that has a first name, last n

Posted: Tue Jul 05, 2022 10:33 am
by answerhappygod
In python
what is wrong with this code?
we have to make a class by the name of the student that hasa first name, last name, a list of grades instance initialization afunction that calculates the GPA, and then we have to make anobject of class a pass value to it.
In Python What Is Wrong With This Code We Have To Make A Class By The Name Of The Student That Has A First Name Last N 1
In Python What Is Wrong With This Code We Have To Make A Class By The Name Of The Student That Has A First Name Last N 1 (66.81 KiB) Viewed 11 times
class Student: H def __init__(self, first_name, last_name, grades=[]): self.first_name self.last_name self.grades = grades • grades = ["A", "B", "C", "D", "F"], - def gpa_calculation(self, grades): - Student = first_name = last_name gpa = float(input("What is your GPA: ")) if gpa == 4.0 or gpa <= 3.8: print("A") elif gpa == 3.7 or gpa <= 3.5: print("B") elif gpa == 3.4 or gpa <= 3.0: print("C") elif gpa == 3.0 or gpa <= 2.8: print("D") else: print("YOU Failed") def get_student_status(self): print(self.first_name + " " + self.last_name + 02 A1 A2 V your Grade is: " + str(self.grades))
from student_status import Student s1 = Student ("John", "Big") print(s1.get_student_status())