Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone explain to me if what I have is a dictionary? I'm trying to call functions that produce some number and store them in

Can someone explain to me if what I have is a dictionary? I'm trying to call functions that produce some number and store them in a dictionary and have the code print out the order from least to greatest.

def main(): #defining my dictionary N=nilakantha() L=leibniz() A=adamchick() myDict={'myPiOne':N,'myPiTwo':L,'myPiThree':A} #sorts by the value of the items in the in the dictionary and returns tuple of values sorted_By_Least_Greatest=sorted(myDict.items(),key=operator.itemgetter(1)) print(sorted_By_Least_Greatest) main()

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

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

=+ Is the information source free from bias on the subject?

Answered: 1 week ago

Question

=+ Is the information source knowledgeable about the subject?

Answered: 1 week ago

Question

=+2. How will it be used?

Answered: 1 week ago