41.Programming Assignment 10 ( using dictionaries)

Now you can try the following programs 

1.Create a student database using dictionary. Read rollnumber, name and mark in computer programming. Use rollnumber as key and the other data must be stored as list.List the students details in the order of roll number. Read a roll number and display the corresponding student details.Delete a particular student details after reading a roll number.
2.Read a list of numbers and print the count of each element in the list in the order.
3.Read a string and print the number of occurrence of vowels in the string.
4.Empno, name and basic pay of ‘n’ employees are stored in a dictionary. Use empno as the key. Read an empno and update the basic pay of that employee.
5.In the above program display the name and basic pay of all the employees in the order of name.
6.Read an octal number( as string) and convert into binary using a dictionary.
7. Write a python program to create a dictionary of roll numbers and names of five students. Display the content of the dictionary in the alphabetical order of names.( University Question)
8.A bookshop details contains the Title of the book and Number of copies of each title. As books are added to the shop, the number of copies to each should increase and as books are sold, the number of copies in each should decrease. Implement this scenario using dictionary data type in Python.(University Question)
9.Read a list of marks(out of 20).Count the three category of students fail(f), pass(p), firstclass(fc).
10.Read a string and find the characters which occurred most, also print their count.
11.Represent a sparse matrix using dictionary. ( refer sample program)
12.Convert hexadecimal number into binary.
13.Program to count the number of occurrence(frequency) of each letters in a given string( histogram)
14.Program to display the frequency of each word in a given string.(university qstn)
15.Program to read name and phn numbers of ‘n’ customers and print the list in sorted order of names

Comments

Popular posts from this blog

Python For Machine Learning - CST 283 - KTU Minor Notes- Dr Binu V P

46.Classes and Objects in Python- Accessors and mutators

KTU Python for machine learning Sample Question Paper and Answer Key Dec 2020