[Python] How to fix ValueError: invalid literal for int() with base 10: [duplicate]

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024.

  1. Stack

    Stack Membro Participativo

    Im new to python doing if statments.

    When i type:

    num1, num2 = int(input()).split


    it comes up with the error "ValueError: invalid literal for int() with base 10:"

    This is the whole code if anyone was wondering:

    num1, num2 = int((input()).split()

    if num1 + num1 % 2 == 0:
    print("equal")
    else:
    print("unequal")

    Continue reading...

Compartilhe esta Página