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
Give reasons why you care for your sense organs​
Cerrena [4.2K]

HI!the resaon why should you care for you sense organs is that they help us to contact with our surroundings.

8 0
2 years ago
Read 2 more answers
What were second generation languages that required detailed knowledge of the computer's hardware and a lot of spare time to wri
Natalija [7]

Answer:

Assembly language is also known as second generation language. We can also say it low level language. To implement assembly language on hardware it require a lot of knowledge of computer hardware.

Mostly assembly language is used in Kernel and hardware drives like RAM or ROM these hardware parts belong to second generation. So, assembly language require a lot of knowledge of hardware as well spare time also to write it to get desired output from the hardware.

Assembly language is also used in video editing and video games and require a lot of time.

I hope it will help you!

4 0
4 years ago
To copy and paste from an excel workbook to a word document, you must first
Montano1993 [528]
Highlight the items or words you are trying to copy, then right click, then click copy and then paste
6 0
3 years ago
Pictures that you can click on to tell your computer what to do
Keith_Richards [23]
What are you asking???????????????????????????????????????????
3 0
3 years ago
The find and
julia-pushkina [17]

Answer:

The find and replace

Explanation:

We can use this functionality in Excel and word if we can find a word, and we want to replace, this is the best option, even if we want to change a lot of words, we can replace it.

For example:

We have a paragraph with 500 words, this is a paragraph about Dad story but, in this case, we've written Mon, we must find the word Mon, and then we enter the word Dad, then we click in find text and in replace all.

8 0
3 years ago
Other questions:
  • To join two or more objects to make a larger whole is to _____________ them.
    8·2 answers
  • What is requirement analysis
    8·1 answer
  • Which part of the os provides users and applications with an interface to manipulate files?
    8·1 answer
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • PLEASE HELP !!!! WILL UPVOTE
    5·2 answers
  • I want pizzzzzzzaaaaaaaaaaa
    9·1 answer
  • Which diagram is used as a popular technique for investigating causes and effects? 1. Cause and effect 2. Fishbone/lshikawa 3. R
    13·1 answer
  • What do financial planning skills ultimately enable an individual to do?
    10·2 answers
  • Write a program to enter 30 integer numbers into an array and display​
    7·2 answers
  • Types of Hazards Mitigation Measures
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!