[Python] Does anyone know how to fix a maxed function in Python?

Discussão em 'Python' iniciado por Stack, Fevereiro 11, 2025.

  1. Stack

    Stack Membro Participativo

    im trying to run a code that finds random numbers between 100 and 199 inclusive but when i run the code it says

    heres my code:

    import random
    list = []
    for i in range(199):
    list.append(random.randint(100,199))
    def max(list):
    answer = list.sort()
    list.pop()
    return max
    print (max(list))


    here's a screenshot of the output for better clarification when i run it, it says the function maxes out and i dont know how to fix it, please help! Thanks!

    Continue reading...

Compartilhe esta Página