1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Taya2010 [7]
3 years ago
5

Q10: Putting it all together (0.75 points) Here, we'll update the values in dictionary, storing the output in a dictionary calle

d other_dictionary. This new dictionary will have the same keys, but some values will be updated. The values in other_dictionary should be updated, such that if the value in the original dictionary is... odd: update the the value stored in the dictionary to store the squared difference of the original value and '10'. Remember, you created a function to do this above.) even: store the original value (from dictionary). Hints: to loop through key-value pairs in a dictionary, check out the .items method You created a squared_diff function above.
Computers and Technology
1 answer:
Molodets [167]3 years ago
4 0

Answer:

# Code in Python

dictionary={'A':1,'B':2,'C':3,'D':4}

other_dictionary={}

for keys in dictionary:

if dictionary[keys]&1==1:

temp=dictionary[keys]*dictionary[keys]-10*10

other_dictionary[keys]=temp

else:

other_dictionary[keys]=dictionary[keys]

print(other_dictionary)  

assert other_dictionary

Explanation:

  • Initialize a sample example dictionary  and other_dictionary.
  • Do a binary comparision for checking odd number .
  • Update the the value stored in the dictionary to store the squared difference of the original value and '10'.
  • For even: store the original value (from dictionary).
You might be interested in
A user calls your help desk to report that the files on her USB stick do not have any permissions associated with them and there
Delicious77 [7]
It is (D) because FAT 32 is the most secure option that is why it is most popular
7 0
3 years ago
Read 2 more answers
Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems. A. procedural abstract
valentina_108 [34]

Answer:

procedural abstraction

Explanation:

5 0
3 years ago
A(n) _____ evaluates a specified data set and returns certain fields from that data set as instructed.
elena55 [62]

The correct answer is Query

5 0
3 years ago
Read 2 more answers
.vx*^#♡■●;(<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="eaceaa">[email&#160;protected]</a>(;=!^$□◇○(
Stells [14]

Answer:??

Explanation:what is that suppose to mean?

please give me a brainiest if you don't mind

4 0
3 years ago
To use Click and type feature can be used to format and enter text graphic and other items
trasher [3.6K]
No more info??? Because I can’t think of how to answer this
6 0
3 years ago
Other questions:
  • How do ethics affect people?
    15·1 answer
  • After reading passage “the incredible machine” why do you think the article has been titled so?
    13·1 answer
  • Which of the following describes ETL? a) A process that transforms information using a common set of enterprise definitions b) A
    14·1 answer
  • Let's go! About to hit 40k!!! Glad to help on Brainly®!!!
    11·1 answer
  • /*Implement a class Address . An address has a house number, a street, an optional
    5·1 answer
  • What is the main difference between weathering, erosion and leaching​
    9·1 answer
  • Simple interest will always pay more interest than compound interest.
    14·1 answer
  • Who is willam afton from five nights at freddy
    13·2 answers
  • Which version of java should i use?.
    13·1 answer
  • Is TCP really more secure than other L4 protocols by default?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!