Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はPythonプログラミングが初めてです。入力浮動小数点数を変換して、10以下の精度(数値の合計桁数)および1(小数点以下の数値)のスケールで出力したいと考えています。どうすればPythonでそれを達成できますか.
>>> float(raw_input("Enter price:")) User price:6738882993.98888888373333 6738882993.988889 >>>
ありがとう
ヘマ
そのためには、float 型ではなく、decimal型が必要です。