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
Genrish500 [490]
3 years ago
7

Write a loop that prints each country's population in country_pop. Sample output with input:

Computers and Technology
1 answer:
Nostrana [21]3 years ago
4 0

Answer:

  1. country_pop = {
  2.    'China': 1365830000,
  3.    'India': 1247220000,
  4.    'United States': 318463000,  
  5.    'Indonesia': 252164800
  6. }  
  7. for key in country_pop:
  8.    print(key + " has " + str(country_pop[key]) + " people")

Explanation:

The solution code is written in Python 3.

Given a dictionary, country_pop with data that includes four country along with their respective population (Line 1-6). We can use for in loop structure to traverse through each of the key (country) in the dictionary and print their respective population value (Line 7-8). The general loop structure through is as follow:

                    for key in dict:

                         do something

One key will be addressed for each round of loop and we can use that key to extract the corresponding value of the key (e.g. country_pop[key]) and print it out.

You might be interested in
3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
yuradex [85]
I would suggest the answer would be both A and D, mail merge is used to specify different field for different recipients. 
4 0
3 years ago
Read 2 more answers
Choose ALL guidelines listed below pertaining to fair use.
tino4ka555 [31]

Answer:

Introduction

As you write blog posts, you may find that you want to include images you find online. Or maybe you found a great piece of writing—a recipe, a story, or a review—that you want to highlight on your own blog. It's important to know that almost all of the content you find on the Web belongs to someone. Just because you can take images, text, and more from other sites doesn't mean it's right to do so—ethically or legally.

In this lesson, you'll learn about the copyright protections that apply to work posted online. You'll learn about the rules that determine which images and text you can use, and how you can use them. You'll also learn how to protect the content you create.

The laws discussed in this lesson are United States laws. No lawyer was involved in preparing this lesson. We are not legal experts, and this lesson should not be taken as legal advice.

Understanding copyright

Copyright is the legal concept that works—art, writing, images, music, and more—belong to the people who create them. According to copyright law, any original content you create and record in a lasting form is your own intellectual property. This means other people can't legally copy your work and pretend it's their own. They can't make money from the things you create either.

To use, copy, or change a copyrighted work, you need permission from the person who holds the copyright. This permission is called a license. Even though everyone has the right to require that others respect their copyright and ask permission to use their work, some people and organizations choose to license their content more freely. They do this by giving their work a Creative Commons license or by placing their work in the Public Domain.

6 0
3 years ago
Read 2 more answers
Write a C++ Programm in which inheritance is used
geniusboy [140]

Answer:

// C++ program to demonstrate inheritance

#include <iostream>

using namespace std;

// base class

class Animal {

  public:

   void eat() {

       cout << "I can eat!" << endl;

   }

   void sleep() {

       cout << "I can sleep!" << endl;

   }

};

// derived class

class Dog : public Animal {

  public:

   void bark() {

       cout << "I can bark! Woof woof!!" << endl;

   }

};

int main() {

   // Create object of the Dog class

   Dog dog1;

   // Calling members of the base class

   dog1.eat();

   dog1.sleep();

   // Calling member of the derived class

   dog1.bark();

   return 0;

}

8 0
3 years ago
Why are high-quality transformers wound with large diameter wire?
lesya692 [45]
So that they can lower the I2R losses
8 0
3 years ago
What is meant by ‘LASER’?
Zanzabum
Light Amplification by Stimulated Emission of Radiation
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
    7·1 answer
  • Devices such as monitors and printers that are connected to a computer are called ________.
    12·1 answer
  • Which of the acronyms listed below refers to a series of basic hardware diagnostic tests performed by the startup BIOS after the
    13·1 answer
  • Cuales son los accesorios electronicos mas recomendados?
    6·1 answer
  • URLs are directions that browsers follow in order to find specific web page files. What is the first part of the URL that is the
    14·1 answer
  • Microsoft’s SharePoint server product dramatically altered the content and records management (RM) markets. Crocker (2015), edit
    6·1 answer
  • SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SU
    6·2 answers
  • Write code that outputs variable numCats. End with a newline.
    6·1 answer
  • 1. The letters that appear after the dot after a file name are called the:
    15·1 answer
  • write an algorithm to settle the following question: a bank account starts out with $10,000. interest is compounded monthly at 6
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!