in my code is always giving the following error 'name (name) is not defined'

Asked

Viewed 70 times

-2

print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-') print('Welcome(to) koalas' log screen!') print('register now, it’s simple, fast and easy!') print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-') Yon = input('Do you wish to register now? [Yes or No]: ')

if Yon == Yes or Yon == Yes:

print('muito bem, vamos começar o seu registro!')

print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
Rlogin = input('digite o nome que será usado no seu login: ')
Rsenha = input('digite a senha que será usada no seu login: ')
print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')

print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
print('seu nome de login é: {}'.format(Rlogin))
print('sua senha será: {}'.format(Rsenha))
print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
YoN2 = input('Você confirma? [Sim ou Não]: ')

while YoN2 == nao or YoN2 == não:

    print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
    Rlogin = input('digite o nome que será usado no seu login: ')
    Rsenha = input('digite a senha que será usada no seu login: ')
    print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')


    YoN2 = input('Você confirma? [Sim ou Não]: ')
else:

    if YoN2 == sim:

        print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
        print('Muito Bem, Você está oficialmente registrado!')
        print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
        print('SEJA BEM VINDO!')
        print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')

    else:

        if YoN == Não or YoN == nao:

            print('Ok, até a proxima!')

the errors that always give are the following: (Unresolved Referral 'Yes') (Unresolved Referral 'Yes') (Unresolved Referral 'No') (Unresolved Reference 'no')

  • yes, and the others should not be strings

  • Important you [Dit] your question and explain objectively and punctually the difficulty found, accompanied by a [mcve] of the problem and attempt to solve. To better enjoy the site, understand and avoid closures and negativities worth reading the Stack Overflow Survival Guide in English.

1 answer

-1


Talk buddy, all right?

Only turn Yes and No to String, using quotes.

Also to improve the code, leave them without the sensitive-case, turning the variable to upper case or all lower case

Browser other questions tagged

You are not signed in. Login or sign up in order to post.