Write a Python program to update an existing key’s value in a dictionary and print the updated dictionary.
A new integer value for the key 'price' in a predefined dictionary `{'item': 'Pen', 'price': 10}`.Print the updated dictionary.
Valid integer price
25
{'item': 'Pen', 'price': 25}
Modify dictionary values by assigning to the key directly.
def update_dict(new_price):
item_dict = {'item': 'Pen', 'price': 10}
# Write your code here
pass
new_price = int(input())
print(update_dict(new_price))Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used