Question: 1. Filename: assign2-1.py Write a program that reads the weekdays followed by their number from the cmd. The program should create a dictionary to store

 1. Filename: assign2-1.py Write a program that reads the weekdays followed

1. Filename: assign2-1.py Write a program that reads the weekdays followed by their number from the cmd. The program should create a dictionary to store days as values and number for each day as key. Then, sort this dictionary BY VALUE in descending and ascending orders. Print out the results as follows. H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module2\assign2-1.py Tuesday 2 Sunday 7 Monday 1 Thursday 4 Friday 5 Wednesday 3 Saturday 6 {"Tuesday': '2', 'Sunday': '7', 'Monday': '1', 'Thursday': '4', 'Friday': '5', 'Wednesday': '3', 'Saturday': '6'} Output in descending order: Sunday => 7 Saturday => 6 Friday => 5 Thursday => 4 Wednesday => 3 Tuesday => 2 Monday => 1 Output in ascending order: Monday => 1 Tuesday => 2 Wednesday => 3 Thursday => 4 Friday => 5 Saturday => 6 Sunday => 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!