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
Whith of the following is not a example of a marine producer
solmaris [256]
You need to provide a picture
3 0
3 years ago
Read 2 more answers
MATH HELP PLEASE!!! THANK YOU
kipiarov [429]

Answer:

This is a cluster because they all have similar values

8 0
3 years ago
Asap plss help me I will give brainlest
Alika [10]

The angle of sunlight is greater in the Southern Hemisphere during the winter. During the June solstice, the opposite is true. The Northern Hemisphere receives the maximum intensity of the sun's rays, while the angle of sunlight decreases in the Southern Hemisphere.

7 0
3 years ago
Which o the following best characterizes the passage as a whole
Korolek [52]
Answer: an informal, public voice
3 0
3 years ago
Match each economist to the scenario that exemplifies his economic philosophy?
Lady_Fox [76]

Answer:

1. A small Caribbean island's economy depends on tourism. However, in recent times, it has seen much less economic activity. Its government decides to let the market correct the situation.

Hayek

2. Flour prices have risen in a country where bread is a staple part of the diet. As a result, bread prices have risen tremendously, in an effort to make bread affordable for its citizens, the government has limited how much bakes can charge for bread.

Keynes

Explanation:

8 0
3 years ago
Other questions:
  • F5. Kimberly wrote 9 papers for her psychology class. She wants to put 7 papers in her portfolio and is deciding on what order t
    12·1 answer
  • Having which trait will enable you to deal with people in a way that does not offend them?
    6·1 answer
  • In 1971, under President Richard Nixon, the federal government passed legislation that “froze” wages and the prices of consumer
    12·2 answers
  • What is the occasion of salvation by langston hughes
    9·1 answer
  • What grade are u in because 9th grade sucks?! Does anyone wanna talk?
    6·2 answers
  • Explain why critical thinking and skepticism are important to scientific inquiry
    6·2 answers
  • Evaluate the Social Cognitive Theory
    13·1 answer
  • Read this glossary entry from the side margin of the passage.
    12·1 answer
  • Why is light so important in transporting information?
    11·2 answers
  • Human interaction with the nitrogen cycle is primarily due to the breakdown of ammonium
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!