Hello everyone I am Santiago
,
I have never used python as a programming language and my teacher has sent us a new assignment
.
The problem is that I do not understand the example that he have given us to understand how the program works, so I do not know how to approach this new task.
If someone can explain the example that is written a little, I would appreciate it
.
Thank you very much in advance
.
P.S.: I let you the task following this message:
SEQUENCE
Consider the following sequence of integers:
• the first member is the number 1
• each further member is constructed such that we look at the previous member and describe
it in the following way:
1st member: 1
2nd member: the first member consists of one digit 1
the second member is therefore 11
3rd member: the second member consists of two digits 1
the third member is therefore 21
4th member: the third member consists of one digit 2 and one digit 1
the fourth member is therefore 1211
5th member: the fourth member consists of one digit 1, one digit 2 and two digits 1
the fifth member is therefore 111221
6th member: the fifth member consists of three digits 1, two digits 2 and one digit 1
the sixth member is therefore 312211
etc…
ASSIGNMENT
Write a program, which reads an integer N (≥ 1) and then prints the first N members of the
sequence.
EXAMPLE
Input: 10
Output:
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211

I have never used python as a programming language and my teacher has sent us a new assignment

The problem is that I do not understand the example that he have given us to understand how the program works, so I do not know how to approach this new task.
If someone can explain the example that is written a little, I would appreciate it

Thank you very much in advance

P.S.: I let you the task following this message:
SEQUENCE
Consider the following sequence of integers:
• the first member is the number 1
• each further member is constructed such that we look at the previous member and describe
it in the following way:
1st member: 1
2nd member: the first member consists of one digit 1
the second member is therefore 11
3rd member: the second member consists of two digits 1
the third member is therefore 21
4th member: the third member consists of one digit 2 and one digit 1
the fourth member is therefore 1211
5th member: the fourth member consists of one digit 1, one digit 2 and two digits 1
the fifth member is therefore 111221
6th member: the fifth member consists of three digits 1, two digits 2 and one digit 1
the sixth member is therefore 312211
etc…
ASSIGNMENT
Write a program, which reads an integer N (≥ 1) and then prints the first N members of the
sequence.
EXAMPLE
Input: 10
Output:
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211