Previous Next
0 / 15
Module DEMO-33-73DEMO-OOP-33

Indexed Grade Lookup

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Parse three grades into an array and print the grade at the requested index. Handle invalid numbers and invalid indexes.

Input Format

Input is given as whitespace-separated raw tokens exactly in the order described by the problem statement.

Output Format

Print the exact success report or exact error message required by the problem.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
80
90
70
1
Grade: 90
Input: first grade = "80", second grade = "90", third grade = "70", requested index = "1".
Derivation: grades = [80, 90, 70] and index = 1 | grades[1] = 90 | "Grade: " + 90 = "Grade: 90".
Output:
Grade: 90
Sample #2
Public sample
50
60
40
0
Grade: 50
Input: first grade = "50", second grade = "60", third grade = "40", requested index = "0".
Derivation: grades = [50, 60, 40] and index = 0 | grades[0] = 50 | "Grade: " + 50 = "Grade: 50".
Output:
Grade: 50

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings