A store has different categories of products in stock as shown below. Item Number= [101, 102, 103, 1047 70 Item Name= [M...
Answers
Answer:
DEPARTMENT: valence Molecular formula sets of No. of bond pairs No. of Hybridization Molecular Bond Dipole lone of central geometry angles moment pairs atoms (ves no) BeCla BF3 3 O Trigonal SnCl2 Planar 120 CHA o NH3 1 H2O 2 Tetra- gonal 109.5 insonal Perapi Bent mgonal 120 midal 90 Resaw अपाय Pyramdal Yes PCI 0 No SF4 1 Yes 4 3 2 S 4 5 2 6 5 4 BrF3 XeF2 SF mo Linear 180° Octan 900 edral Senure 180 IFs 1 PYET XeF4 2 Isnure planar
This is done by a programme as follows:
Explanation:
Programming Language used: Python (PyPy)
Program:
- Define lists
ItemNumber= [101, 102, 103, 104]
Item Name= [Milk, Cheese, Ghee, Bread]
Price= [42, 50, 500, 40]
Stock= [10, 20, 15, 16]
- Take inputs
inum = input()
qty = input()
- Check if number entered is present in the given list or not
if itemnum.isnumeric() and quantity.isnumeric() and (itemnum in ItemNumber):
itemnum=int(inum)
quantity=int(qty)
- Take the index of the item number for further usage
for i in range(len(ItemNumber)):
if inum == ItemNumber[i]:
indexx=i
break
- Print the bill, if the asked quantity is available in the stock; update the stock and print the stock left.
if (quantity<=Stock[indexx]):
print("{:.1f} INR".format(quantity*Price[indexx]))
Stock=Stock[indexx]-quantity
print("{0} LEFT".format(Stock[indexx]))
- Print the NO STOCK if the quantity asked is greater than the stock available and print the stock in availability.
elif quantity>Stock[indexx]:
print("NO STOCK")
print("{0} LEFT".format(Stock[indexx]))
- When the invalid value is received as an input
else:
print("INVALID INPUT")
The question given is incomplete.
COMPLETE QUESTION: the store has different categories of products in stock as shown below. Item Number= [101, 102, 103, 1047 70 Item Name= [Milk, Cheese, Stock= [10, 20, 15, 16] Bread] Price= [42, 50, 500, 40] When user give input with 2 values as - 1. Item number for an item which user wish to buy. 2. Quantity for the item entered above. When a user enters the above input, the stock. 311600de should check the 1. If the quantity is less than stock and the item is available display a notification message showing Output Line1- INR price in a float with precision1 user while
This programme shall work sufficiently for the given question.