**Python**
lst = [58, 98, 82, 69, 90, 74, 68, 88, 71, 44] needNextPass = True k = 1 while k < len(lst) and needNextPass: needNextPass = False for i in range(len(lst) - k): if lst[i] > lst[i + 1]: temp = lst[i] lst[i] = lst[i + 1] lst[i + 1] = temp needNextPass = True for x in lst: letter = '' if x < 60: letter = 'F' elif x < 70: letter = 'D' elif x < 80: letter = 'C' elif x < 90: letter = 'B' else: letter = 'A' print("Your grade is :",letter)
Get Answers For Free
Most questions answered within 1 hours.