class Lab6AQ2: @staticmethod def main(): while True: testSC = input("Enter Test Score: ") # check if letters and/or special characters were entered for test score if not testSC.isdigit(): print("Invalid test score. Unknown character(s) detected!!!!") # check if numbers less than 0 or greater than 100 were entered for test score elif int(testSC) < 0 or int(testSC) > 100: print("Invalid test score. Number outside of grading scale detected!!!!") # check if numbers from 90 to 100 were entered for test score elif int(testSC) >= 90 and int(testSC) <= 100: print("Student received an A!!!!") print("Student passed the test!!!!") # check if numbers from 80 to 89 were entered for test score elif int(testSC) >= 80 and int(testSC) <= 89: print("Student received an B!!!!") print("Student passed the test!!!!") # check if numbers from 70 to 79 were entered for test score elif int(testSC) >= 70 and int(testSC) <= 79: print("Student received an C!!!!") print("Student passed the test!!!!") # check if numbers from 60 to 69 were entered for test score elif int(testSC) >= 60 and int(testSC) <= 69: print("Student received an D!!!!") print("Student passed the test!!!!") # check if numbers from 50 to 59 were entered for test score elif int(testSC) >= 50 and int(testSC) <= 59: print("Student received an E!!!!") print("Student passed the test!!!!") # otherwise numbers from 0 to 49 were entered for test score else: print("Student received an F!!!!") print("Student failed the test!!!!") resp = input("Do you want to process another test score?: ") # check if user wants to enter another test score if resp == "yes": print("Processing another test score!!!!") continue # go back to start of program # check if user does not want to enter another test score elif resp == "no": print("Goodbye!!!!") break # exit program # otherwise the user entered unexpected characters else: print("Unexpected error. Exiting program!!!!") break # exit program Lab6AQ2.main()