We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02a45af commit 139cd3cCopy full SHA for 139cd3c
3-tier.py
@@ -37,9 +37,9 @@ def get_product_information(self, product):
37
product_info = self.business_logic.product_information(product)
38
if product_info is not None:
39
print('PRODUCT INFORMATION:')
40
- print('Name: %s, Price: %.2f, Quantity: %d\n' % \
41
- (product.title(), product_info.get('price', 0), \
42
- product_info.get('quantity', 0)))
+ print('Name: {:.s}, Price: {:.2f}, Quantity: {:.d}'.format(
+ product.title(), product_info.get('price', 0),
+ product_info.get('quantity', 0))
43
else:
44
print('That product "%s" does not exist in the records' % product)
45
0 commit comments