From adb03a050d4c250af5fe3ea92e5ee1cafe46b1d8 Mon Sep 17 00:00:00 2001 From: Megha Garg <43913641+miss-jain-16@users.noreply.github.com> Date: Mon, 25 Oct 2021 17:29:38 +0530 Subject: [PATCH] Update 001. Grading Students.py better logic updation --- Algorithms/02. Implementation/001. Grading Students.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Algorithms/02. Implementation/001. Grading Students.py b/Algorithms/02. Implementation/001. Grading Students.py index 529fbdc..17506a9 100644 --- a/Algorithms/02. Implementation/001. Grading Students.py +++ b/Algorithms/02. Implementation/001. Grading Students.py @@ -1,9 +1,7 @@ # Problem: https://www.hackerrank.com/challenges/grading/problem # Score: 10 - for _ in range(int(input())): grade = int(input()) - if grade >= 38 and grade % 5 >= 3: - grade = (grade + 5) // 5 * 5 + grade = grade-grade%5+5 if grade%5>2 and grade>=38 else grade print(grade)