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
ad-work [718]
3 years ago
13

Write code which prints every number from 1 to 20 a number of times equal to the number itself (e.G. One 1, two 2's...). Every i

ndividual number printed should be separated by a space, and there should be a new line each time the number changes. You should use nested loops to produce your output (it will result in far less code).
Advanced Placement (AP)
1 answer:
madreJ [45]3 years ago
8 0

Answer:

Answered in Python

for i in range(21):

    for j in range(i):

         print(i, end=' ')

    print(" ")

Explanation:

This iteration iterates from 1 to 20

for i in range(21):

This iteration iterates from 1 to current number

   for j in range(i):

This prints the current number in the a number of times equal to itself

       print(i, end=' ')

This enables printing on new line

   print(" ")

You might be interested in
Which of the following is heaviest?<br><br> Proton<br> Electron<br> Quark<br> Photon
kiruha [24]
The correct answer is- Proton

A proton is approximately 2,000 times heavier than an electron. In most cases, atoms have an equal number of protons and electrons. However, because protons are so much heavier than electrons, the electrons do not make a significant contribution to the mass of an atom.
6 0
3 years ago
Um what is pie i math
sertanlavr [38]

Answer:

It is defined as the ratio of a circle's circumference to its diameter

Explanation:

It appears in many formulas in all areas of mathematics and physics. I really hopes this helps

6 0
3 years ago
Read 2 more answers
An equation of the line tangent to y=x3+3x2+2 at its point of inflection is
seraphim [82]

Answer:

y = -3x +1

Explanation:

Given

y = x^3 + 3x^2 + 2

Required

Determine the equation at the point of inflection

The point of inflection of a curve is the point where the second derivative is 0.

So:

y = x^3 + 3x^2 + 2

First derivative is:

y' = 3x^2 + 6x

Second derivative:

y" = 6x + 6

Equate to 0

6x + 6 = 0

Solve for x

6x = -6

x = -1

Next, we calculate the slope (m) of the point using the first derivative.

Substitute -1 for x in y' = 3x^2 + 6x

m = 3*-1^2 + 6 * -1

m = 3*1 - 6

m = 3 - 6

m = -3

To get the y equivalent;

Substitute x = -1 in y = x^3 + 3x^2 + 2

y = (-1)^3 + 3(-1)^2 + 2

y = -1 + 3+ 2

y = 4

Lastly, we calculate the line equation using:

y - y_1 =m(x- x_1)

Where

x = -1 and y = 4

m = -3

So, we have:

y - 4 = -3(x -(-1))

y - 4 = -3(x +1)

y - 4 = -3x -3

Make y the subject

y = -3x -3 +4

y = -3x +1

<em>Hence, the equation is: </em>y = -3x +1<em></em>

4 0
4 years ago
Read 2 more answers
Need help with limits, I don't know what to do. This is calculus
Liula [17]

Answer:

IS this a question?

Explanation:

6 0
3 years ago
What part of the brain is linked to conformity? (not a specific part just the frontal lobe in the right hemisphere or something
Pepsi [2]

<u>The frontal lobe is responsible for social conformity.</u> The frontal lobe is also responsible for planning, thinking, anxiety, stress, depression, etc. The frontal lobe takes credit for mostly logical and personal well-being.

4 0
3 years ago
Read 2 more answers
Other questions:
  • A baseball diamond has the shape of a square with sides 90 feet long. A player is running from first to second base at a speed o
    9·1 answer
  • In an offshore pipeline a cylindrical mechanism called a pig is run through the pipes periodically to clean them. These pigs tra
    10·1 answer
  • Kalama just got a job in an office. She never knows when her boss may come by her cubicle, so she makes sure to always be workin
    11·2 answers
  • The most important example of forced migration in history has been:*
    13·1 answer
  • The equation of a hyperbola is .(x-4)*2/5^2-(y+1)/7^2=1 What are the coordinates of the point of intersection of the asymptotes?
    12·2 answers
  • Animal life has been all but destroyed in sudden, planetwide exterminations five times in Earth’s history. These are the so-call
    6·2 answers
  • Ocean currents near the equator are primarily:
    12·2 answers
  • Which job is the most likely one to employ a plant breeder A working for company installing B working in a retail store C workin
    14·1 answer
  • World Systems Theory divides the countries of the world into 3 catogories BECAUSE
    13·1 answer
  • Click this link to view O*NET's Work Context section for Graphic Designers.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!