Show the (decimal) value of a number of 1s appended with a 3, then squared: Difference between revisions
Show the (decimal) value of a number of 1s appended with a 3, then squared (view source)
Revision as of 21:50, 26 August 2021
, 2 years ago→Python :: Functional
m (→{{header|Python}}: Added a functionally composed variant.) |
|||
Line 514:
===Functional===
Taking the first n terms from an infinite series:
<lang python>'''Sequence of 1s appended with a 3, then squared'''
Line 552 ⟶ 554:
seriesOfOnesEndingWithThree()
)
final = xs[-1]
w = len(str(final))
|