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
The CMOS battery located on a computer's motherboard allows for maintaining the correct time and date information stored in CMOS
siniylev [52]

Answer:

True                

Explanation:

  • CMOS (complementary metal-oxide-semiconductor) is a chip which is placed on the motherboard in order to store the system date and time and this is powered by a CMOS battery which is housed inside this chip and is used to manage the date and time when the system is off.
  • This is a long lasting battery which can work till the life of a motherboard.
  • This battery is also used to maintain BIOS settings and hardware settings and BIOS uses it during the booting process in order to retrieve the stored information regarding the hardware or system date time.
  • CMOS chip is basically volatile and cannot retain settings information when the computer system powers off but the CMOS battery helps to maintain these setting just like system time and date when the computer gets shut down.
4 0
4 years ago
The prediction that the number of transistors on a chip would double about every two years is known as ________. Metcalfe's law
MaRussiya [10]

Answer:

Moore's law

Explanation:

The Moore’s law which was named after the pioneer, Gordon Moore, predicted that the number of transistors on a chip would double about every two years. This law is one of the reasons why computers became so powerful. These transistors and chips are used to make mathematical calculations and in 1965, Gordon made an observation and forecasted that the number of transistors that can be placed in any ICs doubles approximately every two years. Moore was so convinced about this prediction that he went on to co-found the biggest chips processor; INTEL. This trend has been accurate since then but has started to slow down from 2013.

5 0
3 years ago
Assume that a variable variable, number Of Sides has been initialized. Write a statement that assigns the value True to the vari
inna [77]

Answer:

public class ANot {

   public static void main(String[] args) {

   

       int numberOfSides = 20;

       boolean isQuadrilateral;

       if(numberOfSides==4){

           isQuadrilateral = true;

           System.out.println("The triangle is quadrilateral");

       }

       else{

           isQuadrilateral=false;

           System.out.println("The triangle is not quadrilateral");

       }          

}

}

Explanation:

  1. Create and Initilize the int  variable numberOfSides (You can also receive this from a user using the scanner class for example).
  2. create a boolean variable isQuadrilateral
  3. Use if and else statement to check if numberOfSides ==4 and assign true to isQuadrilateral else assign false
7 0
3 years ago
The process of learning by making mistakes and by trial and error is called _____.
vodomira [7]
I believe it’s problem solving.
6 0
3 years ago
Asking yourself questions can help you think of what to _____, in order to get answers.
Olenka [21]
Ask your self questions can help you think of what to measure, in order to get answers.
8 0
4 years ago
Other questions:
  • What is the formula equivalent to the function =SUM(B1:B5)?
    11·2 answers
  • How to write "There are four parking spots on campus that may be used only by Nobel Prize winning faculty." this sentence correc
    12·1 answer
  • Whenever you are passing or another vehicle is passing you, _______ is particularly important to avoid collisions. A. Turning. B
    9·2 answers
  • describe a real-world scenario where data is collected and needs to be both accurate and precise for the safety of the community
    9·1 answer
  • What type of network is capable of delivering voice, video streams, text, and graphics between many different types of devices o
    15·1 answer
  • i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then
    11·1 answer
  • If you have an equipment failure while driving on an expressway, you should
    8·1 answer
  • use the internet to research the SYSTEM account. Why is it nessesary to include this account with full control on a directory
    13·1 answer
  • How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
    12·1 answer
  • What is the<br> binary code<br> for<br> "DMS"?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!