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
Find the area of square whose perimeter is 260.8m​
inessss [21]
4251.04

The perimeter (260.8) over 4 is equal to each side length (65.2)

65.2^2 = 4251.04
5 0
2 years ago
Which feature of a blog allows an author to interact and get feedback from his or her readers? link pingback commenting TweetMem
poizon [28]
Commenting. When someone comments of a blog the blog's writer can comment back, to answer questions, etc.
6 0
2 years ago
Do the pros of interpersonal communication via social media outweigh the cons? Explain.
JulijaS [17]
Well in my opinion is that yes they do. The ability to be able to communicate with others so far way really helps society advance towards the future. And i cant stress of how the benefits of being able to share ideas with well anyone is so wonderful.

I hope this helps.
6 0
2 years ago
Read 2 more answers
What is the use of tag in XML sitemap?
podryga [215]

Answer:

It works as a roadmap which tells search engines what content is available on the website and leads search engines to most important pages on the site. The standard XML tag used for sitemaps can be described as a schema and is used by all the major search engines.

Explanation:

mark me brainliest!!

8 0
1 year ago
What is output by the following program?
zubka84 [21]

The output of the program is 10.

def mult(a, b = 1, c = 1):

    print(a * b * c)

mult(2, 5)

<h3>Code explanation:</h3>

The code is written in python.

  • A function is declared named "multi" and the function has parameter of a, b and c. The default value of b and c are 1.
  • Locally, we print the product of a, b and c.
  • Finally, we call the function with its inputted parameters. Notice we only had 2 argument while calling the function. This simply implies that the default value for c is used. Therefore,  we will have 2 × 5 × 1 = 10

learn more on python here: brainly.com/question/22796383

8 0
1 year ago
Other questions:
  • Is Apple a consumer or luxury brand? Give examples.
    10·1 answer
  • The _____ element, a hypertext markup language (html) metadata element, contains a collection of metadata elements that describe
    11·2 answers
  • Oxygen-18 has an atomic number of 8. How many neutrons are in this isotope?
    7·1 answer
  • Suppose 8 people want to communicate with each other using public key encryption. The communication between any pair of them is
    7·1 answer
  • What does it mean to compact and repair your database? What is the difference between a single
    15·1 answer
  • What is the definition of a digital signal?
    14·1 answer
  • How do i do a mutioutput on a mac
    9·1 answer
  • In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
    11·1 answer
  • A location in memory which stores a value, the value can change as the program is running is
    12·1 answer
  • Select the statements that are true regarding IP addresses. Check All That Apply assigned to your home network by your ISPassign
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!