Answered step by step
Verified Expert Solution
Question
1 Approved Answer
undefined 1. Filename: assign2-5.py Write a program to take user inputs of int numbers (more than 3 numbers) from the cmd into a dictionary as
undefined
1. Filename: assign2-5.py Write a program to take user inputs of int numbers (more than 3 numbers) from the cmd into a dictionary as values until the user type 'done'. For each input, give the default index of 1, 2, 3, ... etc as keys. Print out the dictionary and find the two largest values. H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module2\assign2-5.py 5 6 7 4 3 done The dictionary is {1: 5, 2:6, 3: 7, 4: 4, 5: 3} The two largest numbers are: 7 , 6 H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module2\assign2-5.py 9 12 0 2 3 4 1 7 done The dictionary is {1: 9, 2: 12, 3: 0, 4: 2, 5: 3, 6:4, 7: 1, 8: 7} The two largest numbers are: 12 , 9Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started