Stair-climbing puzzle: Difference between revisions
m
→Iterative
(Added Wren) |
Alextretyak (talk | contribs) m (→Iterative) |
||
Line 1,006:
=== Iterative ===
<lang python>def step_up1():
"""Straightforward implementation: keep track of how many level we
need to ascend, and stop when this count is zero."""
deficit = 1
while deficit > 0:
|