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
In round-robin scheduling,a) the time quantum should be larger than the context switch time. b) the time quantum should be as sm
pickupchik [31]

Answer: d. the time quantum should be as small as possible.

Explanation: Round robin is a CPU scheduling algorithm. If the time quantum is extremely small, number of context switches is very high, round robin scheduling will be same as processor sharing algorithm. Then the algorithm is good. Very large time quantum will make response time of processes too much which may not be tolerated in interactive environment.

3 0
2 years ago
Question 6 (1 point)
Marysya12 [62]
<h2>answers</h2>

Extranet

wifi create extranet so that our mobile network runs smoothly. it can create lan,wan also

7 0
2 years ago
How do you change your username
Rasek [7]

Answer:

Google it, I can't send links, but the brainly faq link should show up

3 0
2 years ago
Read 2 more answers
Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of strings
Makovka662 [10]

The code that examines all the strings in the input source and determines how long the longest string (or strings are) is the following:

total = 0; % initial value is zero, in every while loop it will be incremented

while(input.hasNextInt()){

total += input.nextInt( );

}

7 0
2 years ago
Read 2 more answers
A built-in tool that enables you to use text to type in commands for the operating system is called the _____ prompt.
Natalija [7]
Command prompt is the answer and on Apple devices it is called Terminal.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Most keyboards today are in a
    8·1 answer
  • What do you call a named collection of data stored on a disk?
    15·1 answer
  • While designing your network's VLAN topology, your team has decided to use a centrally managed DHCP server rather than creating
    8·1 answer
  • Find the range of the function for the domain<br>(-4,-2,0, 1.5,4).<br>f(x) = 5x²+ 4<br>​
    13·1 answer
  • Digital certificates can be used for each of these EXCEPT _____. A. to encrypt channels to provide secure communication between
    13·1 answer
  • Comments should be written in what type of language
    6·1 answer
  • Write a C program to input a character, then check if the input
    5·1 answer
  • Plsss help me plsssssss
    11·1 answer
  • What is the launching of a 3-D map called?
    12·1 answer
  • Bank Account Postings While reviewing your checking account balance online, you notice that debit card purchases have not posted
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!