It's a simple code, please help me.

Asked 1 weeks ago, Updated 1 weeks ago, 1 views

for i in range(2, 21):
    if i == 8:
        print()
        ####Source code ####
    print(i, end= ' ')
Output value:
2 3 4 5 6 7

What code should be included in #### source code#### for the output to come out like this?

i[0:8]
i<8
i[:8]

I've tried everything, but I can't think of the answer.

for if문

2022-09-20 10:28

1 Answers

It's a question where the difficulty level is doubled compared to the intention of the examiner. I'll give you a hint.

for has the first to last paragraphs of the list when you give the list, and does the same thing over and over again. At this time, if certain conditions are met, you may want to repeat it until the n term and stop it. For example, a 9-year-old elementary school student said, "Can you count from 1 to 100?" "Then count from one to your age." That's right. Then, the elementary school student should be able to count 1, 2, 3, ..., 9, then stop trying to say "10" and say "I'm done" and finish counting. If you don't know how to pause, the elementary school student will count to 100.

Implements the

tour nearly all programming languages as Python, stop this kind of a roof control is to escape. Now let's look at a given problem. You do repeat and do something with a whole number up to 2 to 21. But the results are printed the number from 2 to 7. Two of them are going to start, but not until the 21st century since the program where she hesitated and I guess we're in. That's where? The repeated through the roof to stop in this program where what is going to do that?

That's all for the hint. Good luck.


2022-09-20 10:28

If you have any answers or tips


© 2022 pinfo. All rights reserved.