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
solniwko [45]
3 years ago
7

Create a dictionary that maps a fruit name to its color. Both the keys and the values should be stored as strings. Include only

the following three entries in the dictionary: apple (red), orange (orange), and banana (yellow). Store the dictionary in a variable named fruit_dictionary.
Computers and Technology
1 answer:
UkoKoshka [18]3 years ago
6 0

Answer:

Written in Python:

fruit_dictionary = {}

fruit_dictionary = {'apple': 'red', 'orange': 'orange', 'banana': 'yellow'}

Explanation:

First (although, not necessary), we create an empty dictionary named fruit_dictionary on line 1

Next, we populate the dictionary using the following syntax:

{key-1:value-1, key-2:value-2,......,key-n:value-n}

In this case, the entry would be:

{'apple': 'red',

'orange': 'orange',

'banana': 'yellow'}

The items on the first column (i.e. apple, orange and banana) are the keys while the items on the second (i.e. red, orange and yellow) are the values of the dictionary

To print the items in the dictionary, you can add  the following line of code:

<em>print(fruit_dictionary.items()) </em>

You might be interested in
Fill in the correct term to complete the statement. _____ refers to borrowing money from a bank.
Vera_Pavlovna [14]

taking a guess here : a lone.

hope this helps.

4 0
3 years ago
Read 2 more answers
Prove that the dual of the exclusive-OR gate is also itscomplement
Tresset [83]

Answer:

Explanation:

The dual of a function means replace AND with OR and replace OR with AND.

XOR gate of A , B is

A \, XOR\, B = AB' + A'B

So, Dual of A XOR B is ( replace AND with OR and OR with AND)

= (A+B')(A'+B)

Complement of A XOR B is (A XOR B) ' = (AB' + A'B) ' = ((A)' + (B')') ((A')' + (B)') = (A'+B)(A+B') (In finding compliment AND becomes OR and OR becomes AND ).

By inter changing the above product of terms  

Complement of A XOR B = (A + B') (A' + B)

So, Dual of A XOR B = Complement of A XOR B.

7 0
3 years ago
Which of the following has likely attended vocational school?
JulsSmile [24]

C- A graphic designer is the awnser

7 0
3 years ago
In your own words, explain the FNAF timeline
tatiyna

Answer:

see shawty problem is, I havent had that phase yet, my cousin would be able to answer this tho

3 0
3 years ago
How to set the maximum to 10? Java
hichkok12 [17]
Public int setLimit(parameter) {
if (parameter > 10) {
return 10;
} else {
return parameter;
}
}
6 0
3 years ago
Other questions:
  • 32.
    11·1 answer
  • Write a program that takes two ints as input from the keyboard, representing the number of hits and the number of at bats for a
    10·1 answer
  • 20 Points!! Please hurry!!
    9·1 answer
  • ____ is the name of a particularly nasty automated program that attacks a network by exploiting Internet Protocol (IP) broadcast
    15·1 answer
  • One blog may have a greater social influence than another when it has_______?
    12·2 answers
  • True or False
    11·1 answer
  • Special words are those words that start and end with the same letter. [14]
    12·1 answer
  • What type of waves in the electromagnetic spectrum has the Search for Extraterrestrial Intelligence (SETI) mostly analyzed in th
    15·1 answer
  • Effective scrum masters apply which coaching behavior
    5·1 answer
  • User defined blocks of code can be created in
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!