[Python] 'int' object has no attribute 'strip' error message

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

  1. Stack

    Stack Membro Participativo

    This is my program and what means this error?

    def menuAdiciona():
    nome = input("Digite o nome de quem fez o cafe: ")
    nota = int(input("Que nota recebeu: "))

    if len(nome.strip()) == 0:
    menuAdiciona()

    if len(nota.strip()) == 0:
    menuAdiciona()

    if nota < 0:
    nota = 0


    AttributeError: 'int' object has no attribute 'strip'.

    Continue reading...

Compartilhe esta Página