Skip to content

Commit 4bdceba

Browse files
authored
Create inventory
1 parent db7dfed commit 4bdceba

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

inventory

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# A local bakery is developing an inventory system. The system will ask the user to input the quantity and price for each item. The items are butter, eggs, flour, sugar and chocolates.
2+
The program will read and calculate the total value of the items in the inventory.
3+
4+
5+
6+
butter_price = input('Enter price of butter : RM')
7+
butter_quantity = input('Enter quantity of butter:')
8+
butter_price = int(butter_price)
9+
butter_quantity = int(butter_quantity)
10+
print(' ')
11+
12+
eggs_price = input('Enter price of eggs: RM')
13+
eggs_quantity = input('Enter quantity of eggs:')
14+
eggs_price = int(eggs_price)
15+
eggs_quantity = int(eggs_quantity)
16+
print(' ')
17+
18+
flour_price = input('Enter price of flour: RM')
19+
flour_quantity = input('Enter quantity of flour:')
20+
flour_price = int(flour_price)
21+
flour_quantity = int(flour_quantity)
22+
print(' ')
23+
24+
sugar_price = input('Enter price of sugar: RM')
25+
sugar_quantity = input('Enter quantity of sugar:')
26+
sugar_price = int(sugar_price)
27+
sugar_quantity = int(sugar_quantity)
28+
print(' ')
29+
30+
chocolate_price = input('Enter price of chocolate: RM')
31+
chocolate_quantity = input('Enter quantity of chocolate:')
32+
chocolate_price = int(chocolate_price)
33+
chocolate_quantity = int(chocolate_quantity)
34+
print(' ')
35+
36+
inventory_cost = butter_price*butter_quantity + eggs_price*eggs_quantity + flour_price*flour_quantity + sugar_price*sugar_quantity + chocolate_price*chocolate_quantity
37+
print('Total value of inventory: RM', inventory_cost)
38+
print(' ')
39+
40+
input('Press ENTER to exit')

0 commit comments

Comments
 (0)