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
Woah my favorite character got arrested
olasank [31]

Not sure how to answer this. But shaggy was quite amazing.

4 0
2 years ago
Read 2 more answers
Which symbol is used for an assignment statement in a flowchart?
Pavlova-9 [17]

Equal symbol

equal symbol

Within most programming languages the symbol used for assignment is the equal symbol.

4 0
2 years ago
Pls help. will give brainliest to FIRST and CORRECT answer!
Zolol [24]

Answer:

All of the above

Explanation:

7 0
2 years ago
A pointing device used mainly for computer games is known as
kolbaska11 [484]

Answer: Joystick is the only one that makes sense, a stylus and digitizer are both used on drawing tablets, not computer games.

5 0
2 years ago
Match the components of a blog to their descriptions.
motikmotik

Answer:

Explanation:

1. entry title - name of the posting

2. permalink - place where a blog posting is located

3. entry date - when the posting became available

4. comment - allows users to add to the conversation

3 0
2 years ago
Other questions:
  • Compute the bitwise XOR between 10010100 and 11101010.
    12·1 answer
  • Larry does not want to save his Internet browsing details on his computer what files delete to clear his information from the co
    7·1 answer
  • In Windows 7/Vista, the information that establishes basic settings such as the location of the operating system and other key s
    7·1 answer
  • What does it mean to be self demanding?
    12·1 answer
  • If you have an equipment failure while driving on an expressway, you should
    8·1 answer
  • A plan budget time for studying and activities is referred to as?
    11·1 answer
  • What is the difference between computer hardware and computer software?<br>​
    10·1 answer
  • Which cpu type would most likely be found in a smartphone?.
    10·1 answer
  • Types of Computer games​
    6·1 answer
  • Which website offers guidance on putting together a checklist to provide guidance on configuring and hardening operating systems
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!