[過去ログ]
Pythonのお勉強 Part74 (1002レス)
Pythonのお勉強 Part74 http://mevius.5ch.net/test/read.cgi/tech/1726881242/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
82: デフォルトの名無しさん (ワッチョイ 4f54-O9y3) [sage] 2024/10/06(日) 19:11:14.13 ID:6RIEhc9V0 print(100 * 1.08 == int(100 * 1.08)) # true print(100 * 1.1 == int(100 * 1.1)) # false 1.08だったら正確に108.0だったのにな http://mevius.5ch.net/test/read.cgi/tech/1726881242/82
83: デフォルトの名無しさん (ワッチョイ 4f54-O9y3) [sage] 2024/10/06(日) 19:18:39.74 ID:6RIEhc9V0 a = 100*1.08 b = int(a) print(a is b) # False print(a == b) # True print(hash(a) == hash(b)) # True d = {} d[a] = 1 print(d[b]) # 1 1.1だとエラー http://mevius.5ch.net/test/read.cgi/tech/1726881242/83
85: デフォルトの名無しさん (ワッチョイ 4f54-O9y3) [sage] 2024/10/06(日) 22:18:43.84 ID:6RIEhc9V0 from fractions import Fraction rate = Fraction(110, 100) print(100*rate == int(100*rate)) # True http://mevius.5ch.net/test/read.cgi/tech/1726881242/85
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.038s