1.- Calculate a student’s final grade considering the following: the student will obtain 5 extra points in the final grade if the tutoring hours are 3 or more, otherwise the final grade will remain the same. The program should display the student’s name and final grade.
### Student Final Grade Calculator Below is a Python program that calculates a student's final grade based on the given conditions. ```python class Student: def __init__(self, name, final_grade, tutoring_hours): """ Initialize a Student object. Args: name (str): The student's name. final_grade (float): The student's final grade. tutoring_hours (int): The number of tutoring hours. """ self.name = name self.final_grade = final_grade self.tutoring_hours = tutoring_hours def calculate_final_grade(self): """ Calculate the student's final grade considering the tutoring hours. Returns: float: The student's final grade. """ if self.tutoring_hours >= 3: return self.final_grade + 5 else: return self.final_grade def display_info(self): """ Display the student's name and final grade. """ final_grade = self.calculate_final_grade() print(f"Student Name: {self.name}") print(f"Final Grade: {final_grade:.2f}") # Example usage student = Student("John Doe", 85.0, 4) student.display_info() student2 = Student("Jane Doe", 90.0, 2) student2.display_info() ``` In this program, we define a `Student` class with attributes for the student's name, final grade, and tutoring hours. The `calculate_final_grade` method calculates the final grade based on the tutoring hours, and the `display_info` method displays the student's name and final grade. When you run the program, it creates two `Student` objects and displays their information. The first student has 4 tutoring hours and receives 5 extra points, while the second student has 2 tutoring hours and does not receive any extra points.