Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 515abec

Browse files
author
Niels Martin Hansen
committed
Currency values should never have more than 2 decimals
1 parent 96e34f0 commit 515abec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def example2(api):
135135
print("Current price for item {} is {}".format(item['item_no'], item['price']))
136136
# modify the item
137137
item.update({
138-
'price': item['price']*1.1
138+
'price': round(item['price']*1.1, 2)
139139
})
140140
print(" New price is {}".format(item['price']))
141141

0 commit comments

Comments
 (0)