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
When a switch is closed, completing an lr series circuit, the time needed for the current to reach one half its maximum value is
uysha [10]
The answer is <span>0.693 .  </span><span>When a switch is closed, completing an LR series circuit, the time needed for the current to reach one half its maximum value is 0.693   

</span>e^(-t/T) = 0.5 
<span>-t/T = ln(0.5) = -0.693 </span>
7 0
3 years ago
Which item converts a high level language program to low level machine instruction?
vodomira [7]
The compiler translates each source code instruction into the appropriate machine language instruction, an
8 0
3 years ago
A man receives a fraudulent email from his bank asking him to confirm his user name and password by going to a particular websit
bonufazy [111]

Answer: The man's info has been found and a hacker was trying to make him confirm his passwrd so he can get a hold of it to hack the man further.

Explanation:

3 0
3 years ago
Which site had a major influence on the social gaming site Friendster?
Oduvanchick [21]
The answer is, "Ryze".
4 0
3 years ago
Read 2 more answers
Using logic gates, design an active low chip select for the memory a 256
drek231 [11]

Answer:

Question (1b) Using logic gates, design an active low chip select for the memory a 256 K memory device starting at address 48000016 in a 16 Megabyte memory space A cache memory stores frequently/recently used data and instructions during instruction execution. With the aid of a diagram explain how the main memory is divided into blocks and how these blocks of main memory are allocated to the lines of cache using direct mapping. Show the output waveform of an AND gate with the inputs A, B, and C indicated in the figure below A B С

Explanation:

8 0
3 years ago
Other questions:
  • If you need to set up direct deposit, which information from your check would you likely need?
    14·1 answer
  • If a file's permissions are set to 760, what permission(s) are available to the group assigned to the file?â
    11·1 answer
  • Can you please help me by sending a proposal onnanotechnology in networking applications
    8·1 answer
  • In what order does the air flow in a canister vacuum cleaner pass through the following components?
    11·1 answer
  • Consider the following code segment, which is intended to set the Boolean variable inRange to true if the integer value num is g
    5·1 answer
  • Alcohol _____________.
    10·1 answer
  • L00000000000000000000000000000000000000000000000000000000l they b00ty tickled
    6·2 answers
  • Whose guidelines should you follow for the destruction of storage media such as thumb drives, Zip drives, and computers?
    6·1 answer
  • An organization has hired a new remote workforce. Many new employees are reporting that they are unable to access the shared net
    11·1 answer
  • 1. Our Systems are Microsoft Dynamics OLTP, we move data from the Source Systems through Staging to a Data Warehouse. Our report
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!