N
N
NG2020-07-31 08:38:30
Python
NG, 2020-07-31 08:38:30

Yandex workshop Cycle?

5f23be67a51ad155253053.jpeg
5f23be75b1116424935274.jpeg
5f23be80c1dfd667762691.jpeg

What's wrong here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PavelMos, 2020-07-31
@NeGrajdanin

Unexpected indent - indents are wrong, in Python in nested constructions, incl. in cycles, each line with a new command must begin with acc. indented. Each nesting level is an additional indent.

print ('a') //основная часть программы - нет отступа
for x in range (1,10): // основная часть программы - нет отступа
    print ('b')   // вложенная  конструкция - отступ
    print ('c')  // вложенная конструкция - отступ
    for j in range (1,5):  // вложенная конструкция -  отступ
        print ('e')  // конструкция, вложенная во вложенную конструкцию -  два отступа

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question