Solution 1

rmotr_dict = {
    'name': 'RMOTR',
    'courses': ['Intro to Python', 'Advanced Python'],

rmotr_dict['name'] = ''
rmotr_dict['email'] = ''
rmotr_dict['courses'].append('Django Web Development')

Updating a Dictionary

Update the dictionary provided in the editor making the following changes:

  • Update the name from "RMOTR" to ""
  • Include a new key email with the value ''
  • Update the list of courses to include "Django Web Development"

Test Cases

test django is in courses list - Run Test

def test_django_is_in_courses_list():
    assert rmotr_dict['courses'] == ['Intro to Python', 'Advanced Python', 'Django Web Development']

test email is correct - Run Test

def test_email_is_correct():
    assert rmotr_dict['email'] == ''

test name is updated - Run Test

def test_name_is_updated():
    assert rmotr_dict['name'] == ''
rmotr_dict = { 'name': 'RMOTR', 'courses': ['Intro to Python', 'Advanced Python'], }