0
I dont understand ... is it only for python?
can s.o explain that code? https://code.sololearn.com/cVifR0ybhcNu/?ref=app
3 Antworten
+ 6
You can read about the Pascal triangle here:
https://en.m.wikipedia.org/wiki/Pascal%27s_triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
The code prints consecutive powers of 11 which happen to be consecutive Pascal's triangle rows, digit-wise -- 11, 121, 1331, 14641...
Answering your question -- no, it's not Python-specific, you can do that in any other language, too. The power operator (**) might be different or non-existent (you have to use pow() in C++), but the mechanism is the same.
+ 5
Yes, or simply put 11**n
0
i understand... it is (10 + 1)**n
right?