COMPUTER SCIENCE-XII-CH1-Dict
COMPUTER SCIENCE-XII-CH1-Dict
COMPUTER SCIENCE-XII-CH1-Dict
with
PYTHON
Hands
on IDLE
Adding data to
>>> d1[“Monitor”]=4500
existing Dict
Hands
on IDLE
>>>Key=input(“Enter Product Name”) Adding New data
>>>val=int(input(“Enter product price”) to existing by
>>>d1[key]=val taking user input
Hands on IDLE:
TRY AND CHECK
OUTPUT Computer Science with PYTHON class XII Chaper-1: Dictionary 4
5. Dictionary: Creating, Inserting and modifying value
Modifying Existing value