Home:ALL Converter>Trying to create a simple gradebook program

Trying to create a simple gradebook program

Ask Time:2019-12-17T06:44:23         Author:Rustywithpythonagain

Json Formatter

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)

Author:Rustywithpythonagain,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59365282/trying-to-create-a-simple-gradebook-program
yy