Dictionaries and its Methods
✕Dictionary and Operations
Question 1 of 2
- Find and display student's name, age, grade and courses enrolled with proper formatting
- Update student's grade to
'A+'and display updated dictionary - Add
'level'key with value'Beginner'and display updated dictionary - Add one more course
'Python'to student's courses and display updated dictionary - Remove
agefrom student information and display updated dictionary - Check if
'address'key is present in student information - Find and display total number of items in student information
- Create a copy of this dictionary, update name to
'Bob', grade to'B'and display both dictionary
Assignstudent_infoas{'name': 'Ram', 'age': 22, 'grade': 'A', 'courses': ['DS', 'SQL']}Membership and Update
Question 2 of 2
- Courses offered by college is stored in dictionary as
'course': ['DS', 'SQL', 'Python'], 'duration': [40, 50, 60]. Check ifPythonis offered in college - College_1 has course as
{'python': {'duration': 3, 'type': 'basic'}, 'java': {'duration': 4, 'type': 'medium'}}. College_2 has course as{'multimedia': {'duration': 2, 'type': 'basic'}, 'javascript': {'duration': 5, 'type': 'advanced'}}. College_1 acquired College_2. Update College_1 course with College_2's and display the updated result - Assign
translation_dictas{'hello': 'hola', 'thank you': 'gracias', 'goodbye': 'adios', ...}. Ask user to input a word in English and display its translation in Spanish. If word is not found, displayTranslation not found - Using
rangefunction, generate a list of even numbers from 0 to 20 and display the result - Using
range, generate and display multiplicate of 3 from 30 to 1 in descending order
- Courses offered by college is stored in dictionary as
