From 689e4721149a57f177c96883d08138da079ddf5e Mon Sep 17 00:00:00 2001 From: sandy7837 <52097518+sandy7837@users.noreply.github.com> Date: Mon, 25 Oct 2021 17:30:58 +0530 Subject: [PATCH] Update 001. Grading Students.py Using single line logic. --- Algorithms/02. Implementation/001. Grading Students.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Algorithms/02. Implementation/001. Grading Students.py b/Algorithms/02. Implementation/001. Grading Students.py index 529fbdc..7a62976 100644 --- a/Algorithms/02. Implementation/001. Grading Students.py +++ b/Algorithms/02. Implementation/001. Grading Students.py @@ -4,6 +4,6 @@ for _ in range(int(input())): grade = int(input()) - if grade >= 38 and grade % 5 >= 3: - grade = (grade + 5) // 5 * 5 - print(grade) + grade = grade - grade%5 + 5 if grade%5 > 2 and grade >= 38 else grade + +print(grade)