Show the (decimal) value of a number of 1s appended with a 3, then squared: Difference between revisions
Content added Content deleted
m (→{{header|Python}}: Added a functionally composed variant.) |
|||
Line 514: | Line 514: | ||
===Functional=== |
===Functional=== |
||
Taking the first n terms from an infinite series: |
|||
<lang python>'''Sequence of 1s appended with a 3, then squared''' |
<lang python>'''Sequence of 1s appended with a 3, then squared''' |
||
Line 552: | Line 554: | ||
seriesOfOnesEndingWithThree() |
seriesOfOnesEndingWithThree() |
||
) |
) |
||
final = xs[-1] |
final = xs[-1] |
||
w = len(str(final)) |
w = len(str(final)) |