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
Motorcyclists face distinct dangers because they __________. A. Are hard to see B. Are not entitled to use a full lane C. Do not
Ne4ueva [31]

Answer:

A. Are hard to see

Explanation:

Motorcyclists have the same responsibilities and rights as car and truck drivers. The same rules apply to all of them (the motorcyclists are also entitled to a full lane), but an important difference is the lack of visibility in the motorcyclists' case. To decrease the issue, many motorcycles have headlights that automatically turn on when the vehicle starts moving.

Measures of precaution are expected from the car and truck drivers, too. For example, they shouldn't only check their mirrors, but do a visual check as well, as motorcycles can easily end up in the blind spot of the vehicle. The drivers should dim their headlights while approaching a motorcycle as, for them, the blinding effect is greater.

5 0
3 years ago
What changes in urbanization are predicted to occur in the next 30 years
VashaNatasha [74]
Climate change- we are experiencing global warming now
7 0
3 years ago
How can you help prevent an accident to a blind spot?
Alenkinab [10]
As blindspot is the area which is not visible in the mirror, we can prevent accident by looking to the side of our shoulder before changing a lane.
I hope it helps!!
8 0
3 years ago
Read 2 more answers
What is the largest Celeste in our solar system? Not sure if I spell that right. I am french. From France.
Dafna11 [192]
The sun,planets, and dwarf planets
7 0
4 years ago
In line 29,”effectual succor” is best paraphrased as:
AnnyKZ [126]
Middle English speakers adapted "socour," the predecessor of "succor<span>," from the Anglo-French sucors, which essentially had the same meaning as our modern word. "Sucors," in turn, derives from the Medieval Latin succursus, itself a derivative of the Latin verb succurrere, meaning "to run to the rescue or "to bring aid."</span>
5 0
4 years ago
Other questions:
  • Wolves and coyotes that live in the same territory hunt for food at different times to reduce overlap in the time they are hunti
    14·2 answers
  • What are the seven cause of monopoly
    15·1 answer
  • In what ways would the Scientific Revolution be considered a revolution?
    6·1 answer
  • Why is it important to site resources. This is from edgenuity 2020
    5·2 answers
  • The obama campaign website was an important tool during the 2008 election
    13·1 answer
  • You can use HTML tags to change the appearance of a single word of test, a sentence, or an entire paragraph without affecting th
    8·1 answer
  • Can someone please help me?
    8·2 answers
  • Many members of Congress will leave politics and become a ________ as a profession?
    11·1 answer
  • Simps for asta from black clover UNITE
    8·2 answers
  • If a country has falling birth rates, what would the government want to do in terms of migration? Will they want to force people
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!