Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ What is a Boolean Data Type? | Boolean Type
Python Data Types
セクション 2.  1
single

single

bookWhat is a Boolean Data Type?

メニューを表示するにはスワイプしてください

It's time to move to the Boolean data type. Variables that are Boolean data types can take the following values: either False or True.

Keywords False and True are capitalized, if we write lowercase we will get an error.

Input:
a = True
print(type(a))

b = False
print(type(b))

Output:
<class 'bool'>
<class 'bool'>
Input:
x = 15 > -5
print(x)
print(type(x))

Output:
True
<class 'bool'>
Input:
y = 17 < 4
print(y)
print(type(y))

Output:
False
<class 'bool'>

In Python, data types such as Boolean and integer are very interrelated, namely the default Boolean value False is represented by an integer 0, and Boolean value True is represented by an integer 1.

タスク

スワイプしてコーディングを開始

You have to fill in the blanks so that all expressions will be True.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  1
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt