Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a class Student with methods to calculate the average and grade based on marks.

Medium

Problem Statement

Create a class Student with methods to calculate the average and grade based on marks.

Sample Input

Marks: [85, 90, 78, 92, 88]

Sample Output

Average: 86.6
Grade: B

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined marks marks = [85, 90, 78, 92, 88] # Your logic here
Log in or sign up to run or submit your code.Log inSign up
Input
Marks: [85, 90, 78, 92, 88]
Expected Output
Average: 86.6
Grade: B