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
harina [27]
4 years ago
14

Consider bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}. Can you replace #blank# so the code will print a g

reeting only to friendly bears? Your code should work even if more bears are added to the dictionary. for bear in bears: if #blank#: print("Hello, "+bear+" bear!") else: print("odd") Enter your code here.
Computers and Technology
1 answer:
Goshia [24]4 years ago
6 0

Answer:

bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}

for bear in bears:

   if bears[bear] == "friendly":

       print("Hello, "+bear+" bear!")

   else:

       print("odd")

Explanation:

A dictionary called bears is given. A dictionary consists of key-value pairs.

You need to check each key-value pairs in bears and find the ones that have "friendly" as value using a for loop and if-else structure. In order to access the values of the dictionary, use the dictionary name and the key (inside the loop, the key is represented as bear variable). If a key has a value of "friendly", print the greeting. Otherwise, print "odd".

You might be interested in
Which of the following activities is not permissible for IT professionals while on the job? Check all of the boxes that apply.
Julli [10]

Answer:

sending coworkers an e-mail joke containing suggestive humor

Explanation:

i think that is the not permissible

7 0
2 years ago
Read 2 more answers
The _____ lists all of the fields that are available in a table.
crimeas [40]

What are the other options? Is this multiple choice or just fill in the blank

7 0
4 years ago
Read the following scenario. How might Sarah correct successfully complete her task?
nexus9112 [7]

Answer:

Explanation:

A: To permanently remove a file from her computer, Sarah doubled-clicked on the My Computer icon and searched for her file under the “Uninstall or change a program” menu option.

or

b: empty the recycle bin : You can permanently delete a program file installed in the computer by following the procedure in option A. The option above will take you to the control panel and you'll be able to select the program you'd want to permanently remove. If you had initially deleted a file like a picture or a document or anything else that you necessarily do not need, it will go to recycle bin. You can head over there and select the Empty the Recycle Bin option to permanently delete the file.

4 0
3 years ago
Which statement is true about customizing presentation programs?
pashok25 [27]
A presentation program<span> is a </span>software<span> package used to display information in the form of a </span>slide show. It has three major functions: an editor that allows text to be inserted and formatted, a method for inserting and manipulating graphic images, and a slide-show system to display the
6 0
4 years ago
What is another word for violation
serg [7]

Answer:

Infringement

Explanation:

The others are incorrect

4 0
3 years ago
Other questions:
  • Are there protections for people in terms of what data can be collected by different sites?
    10·1 answer
  • Create a lottery game application. Generate three random numbers (see Appendix D for help in doing so), each between 0 and 9. Al
    14·1 answer
  • 20 PTS URGENT!!! Derek’s organization uses an emerging technology that uses specialized software to place an image on an object,
    6·2 answers
  • One of the most toxic components of a computer is the _____.
    7·1 answer
  • NAND is logically complete. Use only NAND gates to constructgate-level circuits that compute the
    7·1 answer
  • True or False: Wikipedia is a reliable source. ​
    5·2 answers
  • Which of the following changes the features (e.g., thickness of the line, shadow, 3-D effect, single or double, etc.) of the bor
    14·1 answer
  • Your friend want to make a copy of your new game you bought the previous day .
    8·1 answer
  • Which are malicious codes?
    6·1 answer
  • Sound technology has been influenced the most by the ___.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!