Computer Science, asked by shalinipurushothaman, 6 months ago

Predict the output of the following : (2)

squares={}

for x in range(11):

if x%2==1:

squares[x]=x*x

print(squares)​

Answers

Answered by jai696
4

Output:

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

Explanation:

It saves the odd numbers from 0-10 as the key and their squares as the values in the squares dictionary.

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions