Here is the code I have so far. It keeps looping to the beginning after i input the 5 numbers.
creating gradebook program that allows a user to specify the highest possible grade and then enter individual assignment grades. cannot have the input of grades over the specified highest value, or negative grades. also want to average the grades in the end
def gradebook():
while True:
print("what is the highest grade possible")
inp = int(input())
if inp == "":
cap = inp
gradebook = []
for x in range(5):
l = int(input("enter grade"))
if l > cap:
print("you cannot have a grade higher than " + str(cap))
gradebook.append(l)
print(gradebook)