Computer Science, asked by ZacK2911, 2 months ago

Write a statement to add a Key: Value Pair of 7:49 to dictionary
D=[1:1,3:9,5:25]

Answers

Answered by poojan
1

Statement to add a Key: Value Pair of 7:49 to dictionary  D = {1:1, 3:9, 5:25}

D[7] = 49 is the statement

Complete Program:

/* Dictionary elements should be enclosed within flower brackets*/

D = {1:1, 3:9, 5:25}

D[7] = 49

print(D)

Output:

{1: 1, 3: 9, 5: 25, 7: 49}

Learn more:

Your friend and you made a list of topics and both of them voted if they like or dislike the topic. They wrote 0 to denote dislike and 1 to denote like..

brainly.in/question/44681897

Indentation is must in python. Know more about it.

brainly.in/question/1773116

Attachments:
Similar questions