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
It is a good programming practice to ________ your functions by writing comments that describe what they do.
AleksandrR [38]
It is a good programming practice to explain your functions by writing comments that describe what they do.
7 0
3 years ago
A customer uses an app to order pizza for delivery. Which component includes
ankoles [38]

~frestoripongetosarangeou

5 0
2 years ago
What is the answer to this binary?
USPshnik [31]
Relating to, using, or expressed in a system of numerical notation that has 2 rather than 10 as a base.
5 0
3 years ago
You want to upgrade a server by installing an external SCSI tape drive. The system currently has a SCSI card and an internal SCS
jeka94

Answer:

You should disable termination on the Small Computer System Interface (SCSI) controller card.

Explanation:

SCSI is an acronym for Small Computer System Interface, which is also generally referred to as host bus adapter (HBA). The SCSI is typically a chip that controls the communication between the operating system (OS), storage devices such as hard disk drives and the host computer system. Also, it helps with the interpretation of the electrical signals between the Small Computer System Interface (SCSI) bus and the input-output bus for storage devices.

In this scenario, you want to upgrade a server by installing an external SCSI tape drive. The system currently has a Small Computer System Interface (SCSI) card and an internal SCSI hard drive. At bootup, the system fails to recognize the new tape drive. To solve this problem, you should disable termination on the SCSI controller card so that only the external SCSI tape drive will be active and the SCSI won't be detected.

6 0
3 years ago
All of the following are aspects of the search process except
pogonyaev
<span>B. users vote on the relevance of the source, which affects whether it will appear in future searches. </span>
5 0
3 years ago
Other questions:
  • What is an (CR) Optical character recognition?
    13·2 answers
  • Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of integer
    14·2 answers
  • When you right-click certain areas of the Word or other Office app windows, a command menu will appear. Group of answer choices
    13·1 answer
  • Most people entering the construction industry learn a specific craft through:
    14·2 answers
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • Do rats smell good? what do you think
    8·2 answers
  • Module 1 and 2 Coding Guided Notes Fill in your answers to each response as you read through the lesson pages in the coding cour
    11·2 answers
  • What is the difference between electrical and electronic devices?
    5·2 answers
  • Answer This One Question Right For Brainliest
    10·1 answer
  • Anyone want to play mine mincraft w/ me?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!