Talk:Show the (decimal) value of a number of 1s appended with a 3, then squared: Difference between revisions

 
Line 45:
 
and might be more legible if rearranged into two or three lines. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 22:49, 4 October 2021 (UTC)
 
Perhaps, for example, using the slightly cleaner literal string interpolation idiom, as something like:
<lang python>[
print(f'{"1" * i}3^2 = {int("1" * i + "3") ** 2}')
for i in range(0, 8)
]</lang>
 
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 23:08, 4 October 2021 (UTC)
9,655

edits