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
Why were societies in the Paleolithic period more egalitarian
allsm [11]
Because there was no one to set rule to the peoples, and because of this, everyone possessed the same amount of skill, and women and men were treated equally
5 0
3 years ago
Is this for teachers?
lesya692 [45]

Answer:no

Explanation:

5 0
3 years ago
Read 2 more answers
What is NIR?<br><br><br><br><br><br><br><br><br> I dont need answer nvm
Elodia [21]

Question:

What is NIR?

Answer:

Natural Increase Rate

6 0
3 years ago
Read 2 more answers
Refer to the passage.
OLga [1]

The correct answer is A) The Inca had a public education system under the oversight of a government authority.

The political policies of the Inca Empire were similar to the sultan’s policies in India, as described in the passage in that "the Inca had a public education system under the oversight of a government authority."

For the Inca people, education was a priority. And teh Inca emperor ordered to have a good education system in the empire. Although in the empire there were social classes, education was for all divided into two: the education designed for the upper classes and the education designed for the Inca people in general. The teachers that shared knowledge to the upper classes were known as the Amawtakuna; they were wise men that taught the high classes. Education in the other social classes was transmitted from parents to children.

8 0
2 years ago
A stranded soldier shoots a signal flare into the air to attract the attention of a nearby plane. The flare has an initial veloc
Anettt [7]

<span>
1 . when will the fare reach that height:</span>

<span>The ascending and descending time are equal but let's show it: set the h = 0 </span>

<span>
1500t - 16t^2 = 0 => solve the quadratic </span>

<span>
t = 0 => reject </span>

<span>
t = 375/4 seconds => period to hit the ground, notice that this is twice the time to reach max h. </span>

 

2. If the plane … solution:

<span>d = vt </span>

<span>
t = d/v </span>

<span>
= 50,000/880 </span>

<span>
It is approximately 56.8 sec to reach the flare but the flare reached max h at 375/8 ≈ 46.9 sec, so it won't hit the plane going up, but will it hit the plane on its way down from 35,156.25 ft.</span>

5 0
3 years ago
Other questions:
  • What is true about the stock market
    13·2 answers
  • An area’s _____ most directly influence(s) which animals live there.
    11·2 answers
  • Which of these describes an item for which a change in its supply is proportional to a change in its price ?
    14·1 answer
  • Darcy was working on a presentation on playing chess. Because she chose the Checkerboard animation for her slide title, she had
    8·2 answers
  • Look at the engine shown in the figure. What type of valve system does the engine shown in this figure contain?
    12·1 answer
  • What sort of information did radios bring to homes in America?
    8·2 answers
  • Taking a quiz &amp; i don’t understand please help
    9·1 answer
  • 8- "गंध की लकीर सी' से क्या अभिप्राय है। 1 point O गंध की रेखा O हृदय में सुगंध की अनुभूति O खुशबू O सुगंध से हृदय में प्रसन्नता
    8·1 answer
  • What is correlated constraints
    11·1 answer
  • Psychology
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!