aboutsummaryrefslogtreecommitdiff
path: root/challenge-117/abigail/python/ch-2.py
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2021-06-16 18:31:25 +0200
committerAbigail <abigail@abigail.be>2021-06-16 18:31:25 +0200
commit364bfed5aee47a1c8de4830878d44103263f6c9b (patch)
tree516de30f5ee7c38ac28241017f007af29054329c /challenge-117/abigail/python/ch-2.py
parent2453a627750ee33ee49bde367979204054e92911 (diff)
downloadperlweeklychallenge-club-364bfed5aee47a1c8de4830878d44103263f6c9b.tar.gz
perlweeklychallenge-club-364bfed5aee47a1c8de4830878d44103263f6c9b.tar.bz2
perlweeklychallenge-club-364bfed5aee47a1c8de4830878d44103263f6c9b.zip
Rename prefix to path
Diffstat (limited to 'challenge-117/abigail/python/ch-2.py')
-rw-r--r--challenge-117/abigail/python/ch-2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/challenge-117/abigail/python/ch-2.py b/challenge-117/abigail/python/ch-2.py
index 6ecf44b8f4..c52987fee8 100644
--- a/challenge-117/abigail/python/ch-2.py
+++ b/challenge-117/abigail/python/ch-2.py
@@ -10,15 +10,15 @@
import sys
-def steps (x, y, prefix):
+def steps (x, y, path):
if x == 0 and y == 0:
- print (prefix)
+ print (path)
return
if x > 0:
- steps (x - 1, y, prefix + "R")
- steps (x - 1, y + 1, prefix + "L")
+ steps (x - 1, y, path + "R")
+ steps (x - 1, y + 1, path + "L")
if y > 0:
- steps (x, y - 1, prefix + "H")
+ steps (x, y - 1, path + "H")
steps (int (sys . stdin . readline ()), 0, "")