UrbanPro

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is an example of a practical use of a dictionary(map) in a Python 3 program?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

Computer Trainer: Programming & Software Development.

Dictionary in python are used to store key-value pair. Now suppose their are 5 students in a class, having roll no. 1 to 5. Each have Maths, Physics & chemistry as subject. Now suppose we want to PROCESS this data, for example we want to arrange them in decreasing order of marks in Maths, i.e. student...
read more
Dictionary in python are used to store key-value pair. Now suppose their are 5 students in a class, having roll no. 1 to 5. Each have Maths, Physics & chemistry as subject. Now suppose we want to PROCESS this data, for example we want to arrange them in decreasing order of marks in Maths, i.e. student having highest marks marks in maths is at the top of the list. We can write this data in the following way d={1:[54,67,88], 2:[24,67,56], 3:[99,12,78], 4:[55,33,44], 5:[11,58,79]} # where first element of each list is marks of Maths f=sorted(d,key=d.get, reverse=True) for r in f: print(r, d[r][0]) # This gives the output of roll number of students with max to min marks in Maths # OUTPUT 3 99 4 55 1 54 2 24 5 11 I hope this helps you understand how we can use dictionaries in python. read less
Comments

Related Questions

What are the pros and cons of Python?
### Pros of Python:1. **Easy to Learn**: Python has a simple syntax that is easy for beginners to understand.2. **Versatile**: Suitable for web development, data analysis, machine learning, automation,...
Parminder
0 0
5
Are there coding standards or a style guide for Python programs?
The PEP 8 -- Style Guide for Python Code provides a fairly comprehensive list of Python naming conventions. Here are a few examples, but you should consult the PEP 8 style guide for more detailed information...
A
0 0
7

What are the future career opportunities after Python certification courses?

You can go for many career paths depending upon your interest. The most prominent of them are as follows: Python developer for automation Data Analyst ETL developer Web-Application Developer Machine Learning Expert Data Scientist Data Engineer
Rajnish
Which is best to build web applications: PHP, Python, or Ruby? Why?
I have used almost all of the three language in my web working experience.PHP:It may be not that cool and I think it doesn't rely too much on the framework. Yes, PHP is just a language, but it is the only...
Sunil
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

PEP (Python Enhancement Proposals)
Python Enhancement Proposals(PEP) are suggestions for improvements to the language, made by experienced Python developers. PEP 8 is a style guide on the subject of writing readable code. It contains a...

Why Python
Python can be used in any futuristics technology A= Analytics Data Science Artificial Intelligence(AI) Neural Network(NN) Natural Language Processing(NLP) Computer Vision(OpenCV) In Analytics...

Black in Python
When you are upturn in your career from beginner to experienced in programming world, your team will start looking at ‘how you are writing?’ Here the responsibility piling up. Okay,...

Personalise touch of training & learning
We all are in countinous learning phase in life. Day to day we are learning new things,new language words,new faces,new gazets by all means of modes like reading books,newspapers,watching TV,movies,meeting...
S

Smartnub Softsolutions

0 0
0

Recommended Articles

Python is one of the most popular programming languages in the world. It is general-purpose, object oriented, high-level programming language used in a number of programming fields. Python is a great programming language to learn as it will introduce you to the world of programming. If you are from the technical background...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Looking for Python Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more