Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Keywords: and, or, not | Boolean Type
Python Data Types

Swipe um das Menü anzuzeigen

book
Keywords: and, or, not

There are some keywords for Boolean variables: and, or, not. They exist to create more complex expressions. Next we will see how it works with examples.

  • and. If value x = True and value y = True then x and y is equal to True. If either of those is False, then expression becomes False too.

  • or. If x = True or y = True then the expression x or y is equal to True (or both values = True).

  • not If value x is False then the expression, not x evaluates to True . Otherwise, the expression evaluates to False.

Aufgabe

Swipe to start coding

You must fill in the blanks so that the values ​​of all expressions satisfy the conditions specified in the comments.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 3
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

Awesome!

Completion rate improved to 3.85

book
Keywords: and, or, not

There are some keywords for Boolean variables: and, or, not. They exist to create more complex expressions. Next we will see how it works with examples.

  • and. If value x = True and value y = True then x and y is equal to True. If either of those is False, then expression becomes False too.

  • or. If x = True or y = True then the expression x or y is equal to True (or both values = True).

  • not If value x is False then the expression, not x evaluates to True . Otherwise, the expression evaluates to False.

Aufgabe

Swipe to start coding

You must fill in the blanks so that the values ​​of all expressions satisfy the conditions specified in the comments.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

close

Awesome!

Completion rate improved to 3.85

Swipe um das Menü anzuzeigen

some-alt