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:  inputno_FirstTwoLetterOfBrand_Price. Finally print the dictionary. Sample Input 1: OMEGA 10000 TITAN 5000 TITAN 3000 CREDENCE 150000 OMEGA 12000 CREDENCE 90000

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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: 
inputno_FirstTwoLetterOfBrand_Price. Finally print the dictionary.

Sample Input 1:
OMEGA 10000
TITAN 5000
TITAN 3000
CREDENCE 150000
OMEGA 12000
CREDENCE 90000
STOP
Sample Output 1:
{'OMEGA': ['1_OM_10000', '5_OM_12000'], 'TITAN': 
['2_TI_5000', '3_TI_3000'], 'CREDENCE': ['4_CR_150000', '6_CR_90000']}

Sample Input 2:
CREDENCE 5000
CREDENCE 11000
OMEGA 8000
TITAN 7500
QUARTZ 8000
CASIO 6000
CASIO 7000
STOP
Sample Output 2:
{'CREDENCE': ['1_CR_5000', '2_CR_11000'], 'OMEGA': ['3_OM_8000'], 'TITAN': 
['4_TI_7500'], 'QUARTZ': ['5_QU_8000'], 'CASIO': ['6_CA_6000', '7_CA_7000']}

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:
inputno_FirstTwoLetterOfBrand_Price. Finally print the dictionary.
Sample Input 1:
OMEGA 10000
TITAN 5000
TITAN 3000
CREDENCE 150000
OMEGA 12000
CREDENCE 90000
STOP
Sample Output 1:
('OMEGA": ['1_OM_10000', '5_OM_12000'], 'TITAN":
[2_TL_5000', "3_TI_3000], "CREDENCE: [4_CR_150000', '6_CR_90000']}
Sample Input 2:
CREDENCE 5000
CREDENCE 11000
OMEGA 8000
TITAN 7500
QUARTZ 8000
CASIO 6000
CASIO 7000
STOP
Sample Output 2:
{'CREDENCE": ['1_CR_5000', '2_CR_11000'), 'OMEGA": ['3 OM_8000'), 'TITAN':
[4_TI_7500], 'QUARTZ": ['5_QU_8000'], 'CASIO: ['6_CA_6000', 7_CA_7000]}
Transcribed Image Text: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: inputno_FirstTwoLetterOfBrand_Price. Finally print the dictionary. Sample Input 1: OMEGA 10000 TITAN 5000 TITAN 3000 CREDENCE 150000 OMEGA 12000 CREDENCE 90000 STOP Sample Output 1: ('OMEGA": ['1_OM_10000', '5_OM_12000'], 'TITAN": [2_TL_5000', "3_TI_3000], "CREDENCE: [4_CR_150000', '6_CR_90000']} Sample Input 2: CREDENCE 5000 CREDENCE 11000 OMEGA 8000 TITAN 7500 QUARTZ 8000 CASIO 6000 CASIO 7000 STOP Sample Output 2: {'CREDENCE": ['1_CR_5000', '2_CR_11000'), 'OMEGA": ['3 OM_8000'), 'TITAN': [4_TI_7500], 'QUARTZ": ['5_QU_8000'], 'CASIO: ['6_CA_6000', 7_CA_7000]}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY