while with conditions or

Asked

Viewed 71 times

0

I have the following code: while (operacoes is not '+') or (operacoes is not '-') or (operacoes is not '*') or (operacoes is not '/'): operacoes = str(input('Escolha uma das operações matemáticas a seguir: ( +, -, * ou / ): '))

If I don’t provide any of the four mathematical operations requested, it will keep asking me for an operation, but when I provide some of the operations, it doesn’t go out of the loop.

What am I doing wrong?

  • @Maniero, thanks for the feedback. How do I signal my question as answered?

  • You don’t have to do anything.

No answers

Browser other questions tagged

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