CBSE · 083Class XII · 2025Section B1 mark

Question 24i

4 March 2025 · Computer Science (083)

Consider the following dictionaries, D and D1 :

python
D={"Suman": 40, "Raj":55, "Raman":60}
D1={"Aditi":30, "Amit":90, "Raj":20}

(i) (a) Write a statement to display/return the value corresponding to the key "Raj" in the dictionary D.

Answer

python
print(D['Raj'])

Explanation

Accesses the value associated with key 'Raj' using standard dictionary indexing.