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
My pass to my brainly account is *****************<br><br> should leak my pass?
MArishka [77]

Answer:

no

Explanation:

never keep ue acc u need it !

4 0
3 years ago
After you make a decision, the next step in the decision-making process is to ______. This step will help you determine whether
Kobotan [32]

I think the answer is (reflect on your decision)

8 0
3 years ago
Read 2 more answers
What is meaning of apologising. Hlo kirtika deleted account??? where are you ​
Yuki888 [10]

Answer:

so say sorry for what you've done

6 0
2 years ago
Which is an example of something that is inelastic?
GrogVix [38]
2nd one because it’s I elastic
4 0
3 years ago
Read 2 more answers
Moesha is struggling with reading which includes sounding words, reading quickly, spelling words, etc. This indicates that she m
ludmilkaskok [199]
It would be 12 acres I just did the test!!bdjdgfjrjrurbehehe
4 0
1 year ago
Read 2 more answers
Other questions:
  • What is the "how"pathways of the brain
    11·1 answer
  • ANYONE GOOD AT PSYCOLOGY?! I NEED HELP
    11·1 answer
  • Three of the following infractions are worth 4 points on your license. Which is worth 6 points?
    15·1 answer
  • Name 15 synonyms of Eclipse(for writing class) <br> Will mark brainliest!
    13·1 answer
  • How do you think these people<br> lived? <br> (Big History Projects Unit 1 Easter Island)
    6·1 answer
  • How does AP classes work? And what makes them different from other classes
    8·2 answers
  • Which of the following is not an example of homeostasis?
    14·1 answer
  • An electrical shock happens when electric ________enters the body at one point and leaves through another.
    13·1 answer
  • Explain how seasonal fires benefit grassland ecosystems.
    10·1 answer
  • Principle of Management Questions
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!