Python program to get student details as input and then print the result after updating the marks.
Problem Description: We need to get input from users for the roll number, name and marks of three subjects. Then we need to calculate the percentage and print result, and reprint it after giving extra marks.
Steps to get and put details of student:
- Step 1: Create a class named Student.
- Step 2: The method of the class, getStudentDetails() gets input from the user. printResult() calculates result and prints it.
- Step 3: We will also add extra marks (9), to a subject.
- Step 4: Then print the result.
Program to illustrate printing student result
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer