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
Which type of RAM is used exclusively in laptops?<br> a) SODIMM<br> b) DDR3<br> c) DDR<br> d) DDR4
Black_prince [1.1K]

Answer:

DDR3

Explanation:

6 0
3 years ago
In what year did commercial use of the Internet become available? 1991 1996 1999 2001
Shtirlitz [24]

1991 I hope its right


8 0
4 years ago
Do most of you agree on a primary interpretation? Why?
Damm [24]

Answer:

yes i do

Explanation:

Primary sources directly address your topic and often provide information that is unavailable elsewhere.

6 0
4 years ago
Which two components help input data in a computer and select options from the screen, respectively?
Natali [406]

Answer:

Mouse and Keyboard are the devices which can be used to give input to the computer.

Explanation:

Mouse and Keyboard both are connected with the CPU via USB cable. Mouse consists of 3 major buttons, left button(for click to get the task to be done), right button (to get options) and wheel (to scroll up and down the page on screen). Keyboard is use to type text and letters as per need.

3 0
3 years ago
A display or monitor with a larger number of ?
Leviafan [203]

Answer:

pixels

Explanation:

6 0
3 years ago
Other questions:
  • Which resource helps a user access a cloud service?
    13·2 answers
  • This one too its from computer engineering
    6·1 answer
  • What does the line of red semicircles mean on a weather map
    11·1 answer
  • A computer programme that tells the computer how to perform particular tasks
    8·1 answer
  • Which function returns a valid value without any arguments?
    13·2 answers
  • Contrast the performance of the three techniques for allocating disk blocks (contiguous, linked, and indexed) for both sequentia
    13·1 answer
  • 100BaseT network uses the TCP/IP protocol suite exclusively, and workstations on your network obtain addresses dynamically from
    6·1 answer
  • My study background is business. I am doing a bachelor of business administration. My major course is management information of
    15·1 answer
  • Create and Provide complete program that includes a comments header with your name, course, section and other program details an
    9·1 answer
  • Jose has 3/5 kilogram of peppermints and 2/3 kilogram of candy canes. How many kilograms of candy does he have?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!