From 198333e56557301aeff95af321f4daa29834c61e Mon Sep 17 00:00:00 2001 From: Chatak1 <72140766+Chatak1@users.noreply.github.com> Date: Fri, 2 Oct 2020 22:44:45 +0530 Subject: [PATCH] Please merge my changes into it --- Ch3_Conditionals/print_grade.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Ch3_Conditionals/print_grade.py b/Ch3_Conditionals/print_grade.py index 78aab78..4d9e47d 100644 --- a/Ch3_Conditionals/print_grade.py +++ b/Ch3_Conditionals/print_grade.py @@ -1,8 +1,10 @@ +# To display grades using score + prompt = 'Enter score:' score = input(prompt) try: - if float(score) > 1.0: - print('Bad score') + if float(score) > 1.0: + print('Invalid score') elif float(score) >= 0.9: print('A') elif float(score) >= 0.8: @@ -12,6 +14,6 @@ elif float(score) >= 0.6: print('D') else: - print('F') + print('Fail') except: - print('Bad score') + print('Score is not valid')