Python experts enter, rookies ask for advice on the implementation of a python code for a problem

the requirement of the question is the way to get the highest score. Define N questions by yourself, do not do 0 points, choose to spend a minute to get b points, all spend c minutes to get d points, different questions abcd is different, a total of 120 minutes, how to choose to get the highest score? -sharp-sharp-sharp topic description

sources of topics and their own ideas

this is the realization of one problem, and now we want to realize the optimal method of N questions

def hightest_score(a,b,c,d):
    if a > 120:
        print(":", 0)
    if a<=120<=c:
        print(":", b)
    if  120 > c:
        print(":", d)

hightest_score(20, 20, 100, 100)

what result do you expect? What is the error message actually seen?

Jun.15,2021
Menu