Please help me asap Please help me as soon as possible Write a python program that will take input from the user until the user gives “STOP” as input. In every line the user will provide input as follow: [Brand Name] [PRICE] Your task is to create a dictionary where the brand’s name will be key and the value will be a list of that brand’s watches ID. ID generate process: FirstTwoLetterOfBrand_Price_inputNo. Finally print the dictionary. Sample Input 1: LENOVO 52000 DELL 65000 ASUS 80000 LENOVO 90000 DELL 70000 STOP Sample Output 1: {'LENOVO': ['LE_52000_1', 'LE_90000_4'], 'DELL': ['DE_65000_2', 'DE_70000_5'], 'ASUS': ['AS_80000_3']} Sample Input 2: MACBOOK 120000 HP 60000 DELL 55000 HP 70000 MACBOOK 150000 STOP Sample Output 2: {'MACBOOK': ['MA_120000_1', 'MA_150000_5'], 'HP': ['HP_60000_2', 'HP_70000_4'], 'DELL': ['DE_55000_3']}
Please help me asap
Please help me as soon as possible
Write a python program that will take input from the user until the user
gives “STOP” as input. In every line the user will provide input as follow:
[Brand Name] [PRICE]
Your task is to create a dictionary where the brand’s name will be key and
the value will be a list of that brand’s watches ID. ID generate process:
FirstTwoLetterOfBrand_Price_inputNo. Finally print the dictionary.
Sample Input 1:
LENOVO 52000
DELL 65000
ASUS 80000
LENOVO 90000
DELL 70000
STOP
Sample Output 1:
{'LENOVO': ['LE_52000_1', 'LE_90000_4'], 'DELL':
['DE_65000_2', 'DE_70000_5'], 'ASUS': ['AS_80000_3']}
Sample Input 2:
MACBOOK 120000
HP 60000
DELL 55000
HP 70000
MACBOOK 150000
STOP
Sample Output 2:
{'MACBOOK': ['MA_120000_1', 'MA_150000_5'], 'HP':
['HP_60000_2', 'HP_70000_4'], 'DELL': ['DE_55000_3']}
Step by step
Solved in 2 steps