Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Boolean Type | Control Flow
Introduction to Data Analysis in Python

bookBoolean Type

Boolean Type: bool.

How to set a boolean variable

12345
a = True b = False print(a) print(b)
copy

Boolean operator examples

OperatorReturns
>=True if a number is greater than or equal to another
<=True if a number is less than or equal to another
==True if two values are equivalent
!=True if two values are not equivalent
&&True if both values are True
!True if the value is False
1
print(4 == 6)
copy
question-icon

Fill in the gaps to receive True everywhere.

10 <=
9 ==

8 !=

Click or drag`n`drop items and fill in the blanks

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 1

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Spørg mig spørgsmål om dette emne

Opsummér dette kapitel

Vis virkelige eksempler

Awesome!

Completion rate improved to 2.7

bookBoolean Type

Stryg for at vise menuen

Boolean Type: bool.

How to set a boolean variable

12345
a = True b = False print(a) print(b)
copy

Boolean operator examples

OperatorReturns
>=True if a number is greater than or equal to another
<=True if a number is less than or equal to another
==True if two values are equivalent
!=True if two values are not equivalent
&&True if both values are True
!True if the value is False
1
print(4 == 6)
copy
question-icon

Fill in the gaps to receive True everywhere.

10 <=
9 ==

8 !=

Click or drag`n`drop items and fill in the blanks

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 1
some-alt