0% found this document useful (0 votes)
3 views4 pages

Name:-Mansi Manoj More Class:-Te6I Roll No.: - 02 Batch: - A

The document outlines practical exercises for a Python programming class, focusing on dictionary operations. It includes tasks such as sorting dictionaries by value, concatenating multiple dictionaries, combining two dictionaries with common keys, printing unique values, and finding the highest three values in a dictionary. Each task is accompanied by sample data for implementation.

Uploaded by

p2787269
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Name:-Mansi Manoj More Class:-Te6I Roll No.: - 02 Batch: - A

The document outlines practical exercises for a Python programming class, focusing on dictionary operations. It includes tasks such as sorting dictionaries by value, concatenating multiple dictionaries, combining two dictionaries with common keys, printing unique values, and finding the highest three values in a dictionary. Each task is accompanied by sample data for implementation.

Uploaded by

p2787269
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical 8

Name:-Mansi Manoj More Class:- TE6I


Roll No.:- 02 Batch:- A

1. Write a Python script to sort (ascending and descending) a dictionary by


value.

2. Write a Python script to concatenate following dictionaries to create a new


one.Sample Dictionary:
(a) dic1 = {1:10, 2:20}
(c) dic2 = {3:30, 4:40}
(d.) dic3 = {5:50,6:60}
3. Write a Python program to combine two dictionary adding values for
common keys.
a. d1 = {'a': 100, 'b': 200, 'c':300}
b. d2 = {'a': 300, 'b': 200, 'd':400}

4. Write a Python program to print all unique values in a dictionary. a. Sample


Data: [{"V":"S001"}, {"V": "S002"}, {"VI": "S001"}, {"VI": "S005"}, {"VII":"S005"},
{"V":"S009"}, {"VIII":"S007"}]
5. Write a Python program to find the highest 3 values in a dictionary.

You might also like