So basically i'm stuck with my code and it's for homework and i don't know how to fix the error that i'm getting "unindent does not match any outer indentation level" I've tried to fix it myself but i haven't had any success, so i'm reaching out to anyone that would like to help me.
Here's my code
exit = False
while not exit:
#variables
name=str(input("Enter your students name "))
#User ratings for rolleston spirit
DSR=int(input("Enter rating for Develop Self "))
BCR=int(input("Enter rating for Building Communities "))
TFR=int(input("Enter rating for Transforming Futures "))
#If the input is above a certain number, it will print the student is doing well and if an input is below a ceratin number it will print the student needs support in .....
if DSR>=6:
print (name, "is doing well in developing self")
elif DSR<4:
print (name," needs support in developing self")
if BCR>=6:
print (name, "is doing well in Building Communities")
elif BCR<4:
print (name," needs support in Building Communities")
if TFR>=6:
print (name, "is doing well in Transforming Futures")
elif TFR<4:
print (name," needs support in Transforming Futures")
#Function to find the highest number in a list
def maxi(items):
#max finds the highest number in a list
return max(items)
print(name, "highest score was ", maxi([DSR, BCR, TFR]))
#function to get average of a list
def Average(lst):
return sum(lst) / len(lst)
# Creating List
lst = [DSR, BCR, TFR]
average = Average(lst)
# Printing average of the list
print(name, "has an overall rating of ", round(average, 2))
rep=str(input("Do you wish to continue? Y/N "))
if rep=="Y":
print (" ")
elif rep =="N":
exit = True
print(" ")
Expected output of the code.
Enter your students name Name
Enter rating for Develop Self 3
Enter rating for Building Communities 7
Enter rating for Transforming Futures 9
Name needs support in developing self
Name is doing well in Building Communities
Name is doing well in Transforming Futures
Name highest score was 9
Name has an overall rating of 6.33
Do you wish to continue? Y/N