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
Who<br> invented the term “debugging”?
Black_prince [1.1K]

Grace Murray Hopper invented it

8 0
2 years ago
Read 2 more answers
_____ refers to unsolicited commercial emails, usually sent to a large number of people with little regard to the users interest
frozen [14]
Spam refers to large unsolicited email irregardless of the recipients views on the matter
5 0
3 years ago
What does a file association specify?
Olenka [21]

Answer:

The answer is D

Explanation:

file association associates a file with an application capable of opening that file. More commonly, a file association associates a class of files with a corresponding application.

4 0
2 years ago
Read 2 more answers
4.3 mini programs AP computer science
allochka39001 [22]

1.

name = input("Enter your name: ")

num1 = int(input("Hello "+name+ ", enter an integer: "))

num2 = int(input(name+", enter another integer: "))

try:

   if num1 % num2 == 0:

       print("The first number is divisible by the second number")

   else:

       print("The first number is not divisible by the second number")

except ZeroDivisionError:

   print("The first number is not divisible by the second number")

try:

   if num2 % num1 == 0:

       print("The second number is divisible by the first number")

   else:

       print("The second number is not divisible by the first number")

except ZeroDivisionError:

   print("The second number is not divisible by the first number")

2.

import random, math

num1 = float(input("Enter a small decimal number: "))

num2 = float(input("Enter a large decimal number: "))

r = round(random.uniform(num1, num2), 2)

print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))

I hope this helps!

8 0
3 years ago
During Iteration planning, the PO introduces multiple new stories to the team. After a lot of discussion, the team decides to in
netineya [11]

Answer:

The answer is "Option d".

Explanation:

The Iteration Management is also an activity in which all members of the team will determine how many the backlog team will allocate towards the next Iteration, and each team wraps up the work only as a group of determined iteration targets. in the given question the "choice d" is correct because The plans to achieve without training entered PO or design staff and requirements have not even been identified, and the wrong choice can be defined as follows:

  • In choice A, T' he PO doesn't give the story detail, that's why it's incorrect.    
  • In choice B,  the doesn't a team left the past for more refining with the PO in the Project Backlog, that's why it's incorrect.  
  • In choice C, The Development Team has not found some other team dependency, that's why it's incorrect.

4 0
3 years ago
Other questions:
  • Write a program which can do a String Check if its Panagram or not!
    10·1 answer
  • All of the language commands that the CPU understand make up the CPU's
    15·1 answer
  • Fill in the blank
    13·2 answers
  • Jawana has been working on a paper for her Anatomy class for weeks. One day her little brother was on her computer and accidenta
    14·1 answer
  • In today's classrooms, computers are generally being used to
    6·1 answer
  • There exists a data type Date with member function Increment that increments the current Date object by one. The ++ operator is
    7·1 answer
  • Password is an example of an authentication mechanisms that is based on " what an entity has".
    6·2 answers
  • Given a number count the total number of digits in a number
    12·1 answer
  • Friday Night Funkin Fans, does this count as a leak if I share it?
    13·2 answers
  • If you anticipate running a particular query often, you can improve overall performance by saving the query in a special file ca
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!