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
To make something ready for some activity is to ________it.
WINSTONCH [101]

Answer:

prepare (e.g. SQL prepared statements)

parse/convert (e.g. parse a string as an int/convert an array to string)

Explanation:

4 0
3 years ago
Lukas entered the date 9-17-2013 in an Excel workbook. He wants the date to appears as “Tuesday, September 17, 2013.” Instead of
Sphinxa [80]
<span>The answer is highlight cells, select the Insert tab, click on the number, select Date from the category box, highlight the correct format, and click OK.</span>
8 0
3 years ago
What does an SQL injection do
Afina-wow [57]

Answer:

SQL injection is a form of hacking that uses user input fields.

Explanation:

SQL injection is when a piece of code or entire algorithm is input where a program prompts for user input. They can be used to change or access data. To prevent this, a programmer should scrub inputs. Scrubbing data removes slashes and arrows, which or commonly used in code.

3 0
3 years ago
Read 2 more answers
Cascading style sheets (css) use special hypertext markup language (html) tags to globally define font characteristics for a var
ehidna [41]
The statement that Cascading style sheets (CSS) use special hypertext markup language (HTML) tags to globally define font characteristics for a variety of page elements as well as how those elements are laid out on a web page is true. <span> CSS is a stylesheet language used to describe the presentation of a document written in HTML or XML.</span>
5 0
3 years ago
What are two distinctive types of unmanned aircraft systems
chubhunter [2.5K]
Probes and Drones
Hope this helps and please give brainliest!
8 0
3 years ago
Other questions:
  • These devices: monitor, earphone, speakers are examples of what? Input devices Storage devices Output devices All answer are cor
    10·2 answers
  • A. True <br> b. False: variables represent storage locations in the computer's memory.
    13·1 answer
  • A raised dot (ú) shows where the enter key was pressed. true or false.
    13·1 answer
  • You can use RWA to demonstrate how to do something special on the web, such as displaying articles found on websites that suppor
    15·1 answer
  • If your BAL is .10 you can expect a _______ drop in complex performance compared to the sober level
    6·1 answer
  • . The toasting cycle of an automatic toaster is started by A. pushing the bread rack down. B. pushing the start button. C. turni
    14·2 answers
  • To reload a picture taken with a digital camera means to copy the digital picture from the camera to your computer.
    5·2 answers
  • What blockchain implementation resulted from bitcoin’s rejection of a recommendation to enhance its scripting language support?
    9·1 answer
  • Which of these can be represented visually by a flowchart?
    11·2 answers
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!