In: Computer Science
Write code to create a Python dictionary called class.
Add two entries to the dictionary:
Associate the key 'class_name' with the value 'MAT123', and associate the key 'sect_num' with '211_145'
Please find below the code, code screenshots and output screenshots. Please refer to the screenshot of the code to understand the indentation of the code. Please get back to me if you need any change in code. Else please upvote
CODE:
Class = {} #create an empty dictionary called class.
Class["class_name"] = "MAT123" #Associate the key 'class_name' with the value 'MAT123'
Class["sect_num"] = "211_145" #Associate the key 'sect_num' with '211_145'
print(Class) #displaying the dictionary Class