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]
3 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]3 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
Edhesive unit 4 test
sergij07 [2.7K]

Answer:

padna jana ta yarrr kasto this yarr

8 0
3 years ago
How can officers in the armed services receive college educations? Select the best answer choice. A. All of the answers are corr
Ber [7]

Answer:

i think A. is the answer but if it isn't B. Taking courses through the GI Bill is correct

Explanation:

i have multiple friends that are recruiters and i'm in rotc.

4 0
3 years ago
Which of the following is usually used to connect a monitor to a computer?
viva [34]

Answer:

DVI cable

Explanation:

DVI is for video signals.

Some monitors have a usb hub built in and therefore also have a USB connection, but that is not their primary function.

5 0
3 years ago
Read 2 more answers
Which of the following are good ways to protect your computer? check all that apply
Zanzabum
Everything but answer d I think
7 0
4 years ago
Read 2 more answers
For the given ERM diagram model, indicate (list the names of):
tatyana61 [14]

Answer:

This is called contradiction cloud responsibility (CCR)

Explanation:

3 0
2 years ago
Other questions:
  • ".com" is an example of which of the following?
    5·2 answers
  • Under the advanced options screen, what startup option should be enabled in order to view what did and did not load during the b
    12·1 answer
  • Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out t
    9·1 answer
  • Fallon is a new student on campus. Everywhere she goes, she is asked for her 12-digit student number. To memorize her new studen
    10·1 answer
  • Write a program that input a number and display its precessor and successor number using function.
    7·1 answer
  • A Homecoming Crossword Puzzle
    12·1 answer
  • Word-processing,spreadsheets, databases, and desktop publishing are all types of _______?
    12·2 answers
  • Story to brighten your day :D
    7·1 answer
  • Question 7 (1 point)
    10·1 answer
  • For the function below, list 4 ordered pairs for that function.<br> y = 3x + 1
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!