answer.
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]
2 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]2 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
What of the 16oz cups below holds the appropriate amount 100 proof alcohol to equal one standard drink
mash [69]

Answer : one pint of beer = 1 shot of liquor = half glass of wine

Explanation : When we consider that 16 oz cups holds 100 proof alcohol which is equal to one standard drink;

So, 12 oz beer can be considered to be equal to one 4 oz glass of wine.

Now, this 4 oz of glass wine will be equal to 1.5 oz shot of liquor and has 1.5 ounces of distilled spirits, which will be about 40% alcohol.

Therefore, one 12 oz of beer = one 4 oz. for glass of wine = one 1.5 oz shot of liquor.

4 0
2 years ago
Read 2 more answers
"The lorax" APHG<br>What type of agriculture would harvesting truffula trees be?
Leto [7]
<span>Industrialized agriculture. Because he plants them,takes care of them,manufacture them and sell them.

Hope this helps,

kwrob

</span>
8 0
2 years ago
Explain how the Brutus uses the<br><br> "great thinkers" to support his<br><br> argument?
mrs_skeptik [129]

Answer:

10 through a political science lens, you will focus on the argument for why a .... Explain how the Brutus uses the “great thinkers” to support his argument?

Explanation:

4 0
2 years ago
If you were a teacher how would you feel about students eating in class?
victus00 [196]

Answer:

Honestly, I would join them

7 0
2 years ago
Read 2 more answers
In my classroom there are 72 35-watt (W) light bulbs. How much will it cost to light my room for an entire school year if the co
natita [175]

The direct and easy solution for this problem is through dimensional analysis. This is done by cancelling out the same units of dimensions resulting to the unit of what is asked. In this case, the resulting unit should be in $.

The number of hours in a day from 7:15 am to 2:45 pm is 7.5 h. In 187 days, that would be:

187 days * 7.5 h/day = 1402.5 h

The rest of the solution goes:

1402.5 h * $0.1/kWh * 1 kW/1000 W * 35 W/bulb * 72 bulbs =

$353.43

5 0
2 years ago
Other questions:
  • Which of the following arguments is supported by the demographics of families in the work force, as described in the lesson?
    13·2 answers
  • Mr.Jones wants to buy 6 tickets to play .Each ticket cost $10. Mr jones has $45 in his pocket how much more money does he need f
    14·2 answers
  • David is a 6’3”, 320-pound, middle-aged man who feels tired all the time and suffers from a variety of issues including sleep di
    11·2 answers
  • A market analyst is curious what proportion of Los Angeles residents have a landline telephone. A survey of 200 randomly selecte
    10·1 answer
  • Gavin seeks psychotherapy to deal with a phobia. His therapist is not concerned with the underlying cause of the phobia, but rat
    12·1 answer
  • How did some students and tutors find shortcuts to learning? How did the Chinese government react to these shortcuts?
    6·1 answer
  • Anthony borrowed $15 from his mom to pay for food at the school dance. He bought one snow cone for $3, and then used the rest of
    14·1 answer
  • A local botanist believes that the town water supply contains contaminants that are killing the native plant life. She intends t
    13·1 answer
  • Annaleigh looked at a line graph to see the amount of rainfall over the entire year. Why did she choose a line graph?
    13·2 answers
  • An airline records data on several variables for each of its flights: model of plane, amount of fuel used, time in flight, numbe
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!