write a program to create a dictionary namely Dct with 10 keys 0...9,each having same value as 200.update the first and last value by adding 200 to each of them.
in python.
Answers
Answered by
8
Dct = {n: 200 for n in range(10)}
print(f"{Dct}\n")
Dct[list(Dct)[0]] += 200
Dct[list(Dct)[-1]] += 200
print(Dct)
Answered by
4
Answer:
Dct = {n: 200 for n in range(10)}
print(f"{Dct}\n")
Dct[list(Dct)[0]] += 200
Dct[list(Dct)[-1]] += 200
print(Dct)
\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!
Similar questions