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 was a positive effect of the Columbian Exchange for Native American cultures?
lapo4ka [179]
Positive outcomes of the Columbian Exchange include technological advances in farming, architecture, and weaponry.
5 0
3 years ago
A __________ is one in which the driver's line of sight or path of travel is impeded.
Natali5045456 [20]
Hello :)

I believe your answer is a blind spot

Hope this helps
6 0
3 years ago
Read 2 more answers
What are the similarities and differences between neurotransmitters and hormones
MatroZZZ [7]
Neurotransmitters work locally and their actions are very fast. Both hormones and neurotransmitters act as chemical messengers in the body. However, neurotransmitters' actions are short-lived while hormones act for longer periods of time. Neurotransmitters are delivered through the bloodstream, whereas hormones are found primarily in the synaptic cleft. Hormones are mostly released by glands, whereas neurotransmitters are made in the cell body of the neuron.
8 0
1 year ago
Start a convo I literally have 5,000 points
steposvetlana [31]

Answer:

Hi how are you doing today?

5 0
2 years ago
Read 2 more answers
which of the following defines chicago's position in relation to the infrastructure of the united states
valina [46]
The answer should be “Situation”
7 0
3 years ago
Read 2 more answers
Other questions:
  • Danny has been collecting comic books since he was a child. If you ask him, he can tell you the name of every comic in his colle
    12·1 answer
  • How did the Atlantic Slave trade impact world history?
    13·1 answer
  • Why is Wilhem Wundt considered the "Father of Psychology"?
    9·2 answers
  • Why are theories and hypothesis important in pcychology? Why do we need replicate studies that have been conducted?
    13·1 answer
  • Select the items below that describe nonrenewable resources.
    12·2 answers
  • What staar tests do 10th graders take in texas
    11·2 answers
  • A movement from point A to point B illustrates which of the following?
    7·1 answer
  • Hey, Guys! Can you guys give me all of the advantages and impacts of the second agricultural revolution?
    5·1 answer
  • The mean price of computers sold at a particular store is $949 with a standard deviation of $75. The z-score of a certain comput
    6·1 answer
  • ABC is a triangle.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!