2015-06-25 10:50:00 +01:00
|
|
|
try:
|
|
|
|
import ujson as json
|
2017-02-14 22:56:22 +00:00
|
|
|
except ImportError:
|
|
|
|
try:
|
|
|
|
import json
|
|
|
|
except ImportError:
|
|
|
|
print("SKIP")
|
2017-06-10 18:14:16 +01:00
|
|
|
raise SystemExit
|
2015-06-25 10:50:00 +01:00
|
|
|
|
2020-03-23 02:26:08 +00:00
|
|
|
|
2015-06-25 10:50:00 +01:00
|
|
|
def my_print(o):
|
|
|
|
print("%.3f" % o)
|
2020-03-23 02:26:08 +00:00
|
|
|
|
2015-06-25 10:50:00 +01:00
|
|
|
|
|
|
|
my_print(json.loads("1.2"))
|
|
|
|
my_print(json.loads("1e2"))
|
|
|
|
my_print(json.loads("-2.3"))
|
|
|
|
my_print(json.loads("-2e3"))
|
2019-05-14 05:45:54 +01:00
|
|
|
my_print(json.loads("-2e+3"))
|
2015-06-25 10:50:00 +01:00
|
|
|
my_print(json.loads("-2e-3"))
|