Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program I have a nested dictionary { 1: [2, 4, 1, 3], 2: [1, 3, 2, 4], 3: [4, 3, 1, 2], 4: [1,

Python program

I have a nested dictionary { 1: [2, 4, 1, 3], 2: [1, 3, 2, 4], 3: [4, 3, 1, 2], 4: [1, 3, 4, 2], 5: [2, 3, 4, 1], 6: [3, 1, 2, 4] }

What i want is to assign values to each item in my list. So i need a function that assigns value of 1 to every first item in the list, I/2 to the 2nd position. 1/3 to the 3rd position. 1/4 on to the 4th position.

So for example my list 1 becomes [(2,1) (4,1/2) (1,1/3) (3,1/4)], Then when i want to tally each number value going over all of my 6 list in my dictionary. The number with the highest value wins

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

5. Discuss the key components of behavior modeling training.

Answered: 1 week ago

Question

4. Develop a self-directed learning module.

Answered: 1 week ago