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
makkiz [27]
3 years ago
10

Can somebody help me and make a code for this in PYTHON, please? I would be very thankful!

Computers and Technology
1 answer:
Keith_Richards [23]3 years ago
4 0

Code:

population_china = 1420062022

population_india = 1368737513

years = 0

while population_china >= population_india:

   population_china *= 1.0035

   population_india *= 1.0108

   years += 1

print(years)

Output:

6

Explanation:

Using a while loop would probably be of greater use than a for loop since we are increasing the population growth of both countries until India's population surpasses China's population (so a condition needs to be set).

Looking at the code, we first set the original population of both countries in their own variables (population_china, population_india). We also set the 'years' variable at 0, which will increase with respect to the yearly population growths of both countries. In the while loop, the condition population_china >= population_india will allow for the variable 'years' to increase until population_india surpasses population_china. Once India's population is larger than China's population, we are left with the number of years it takes for India's population to surpass China's population, which is 6 years.

Hope this helps :)

You might be interested in
Why should running your unit test suites not take a long time?A. Unit tests aren't that important, so less time should be spent
masya89 [10]

Answer:

D. Tests that run too long risk slowing down the feedback cycle for developers

Explanation:

The reason you should run your unit test suites not to take a long time is that "Tests that run too long risk slowing down the feedback cycle for developers."

Otherwise, the developers would find it difficult to detect problems instantly, causing delay to fix the problems which will eventually delay the developers or project's team to advance to the next stage of the project.

3 0
3 years ago
Readable code includes the use of
Kobotan [32]

Answer:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbbbbbbbbbbbbbbbbbbbbbbbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

Explanation:

7 0
3 years ago
Read 2 more answers
A. Calculate the diffusion coefficient for magnesium in aluminum at 450°C.
SIZIF [17.4K]

Answer:

a) D = 4.88 * 10^(-14) m^2 / s

b)   <em>t </em>= 1.1 hr

Solution:

a) Magnesium in Aluminum diffusion:

D = Do * exp(-Qd / RT)

  =  (1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15)

  = 4.88 * 10^(-14) m^2 / s

D = 4.88 * 10^(-14) m^2 / s

b) The composition remains same at say the distance Xo:

(Cx - Co) / (Cs - Co) = Constant

Xo^2 / D_{550} * <em>t </em>= Xo^2 / D_{450} * 15

D_{550} * <em>t </em>= D_{450} * 15

(1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15) * <em>t</em>

(4.88 * 10^(-14) m^2 / s) * 15

by, solving for <em>t </em>we get:

 <em>t </em>= 1.1 hr

So, the time required is 1.1 hr.

5 0
3 years ago
What is the impact of Customer Centricity?
skad [1K]
Customer-centric businesses generate greater profits, increased employee engagement, and more satisfied customers. Customer-centric governments and nonprofits create the resiliency, sustainability, and alignment needed to fulfill their mission.
5 0
2 years ago
How assemblers and linkers work together?
alina1380 [7]
An assembler converts source code programs from assembly language to machine language and a linker combines files created by an assembler into a program that is executable.
5 0
3 years ago
Other questions:
  • Write a character literal representing the (upper case) letter<br> a.
    13·1 answer
  • "In about 100 words, describe the idea behind software as a service (SaaS). In your answer, include at least three examples of e
    10·1 answer
  • On a Linux system, which command allows you to modify settings used by the built-in packet filtering firewall?
    15·1 answer
  • How long is the latency time of a typical hard-disk drive spinning at 360 revolutions per second?
    6·1 answer
  • What is ambient sound, and what is its purpose in film? When can it be a drawback ?
    7·1 answer
  • IoT is the interconnection of what?<br> Hardware<br> Networks<br> Everyday devices<br> Cables
    10·1 answer
  • Question 4 (Worth 5 points)
    14·2 answers
  • How to write conclusion of hard disk​
    11·1 answer
  • For (int j- 4; j &gt; 0; j--)
    9·1 answer
  • A sample member of the list data is a1 = ['male', True] where the second item is True if the person is on the phone.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!