We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c04620 commit 6ad7e6dCopy full SHA for 6ad7e6d
1 file changed
dynamic_programming/catalan_numbers.py
@@ -59,11 +59,11 @@ def catalan_numbers(upper_limit: int) -> "list[int]":
59
60
if __name__ == "__main__":
61
print("\n********* Catalan Numbers Using Dynamic Programming ************\n")
62
- print("\n*** Enter -1 at any time to quit ***")
+ print("\n*** Enter negative int at any time to quit ***")
63
print("\nEnter the upper limit (≥ 0) for the Catalan number sequence: ", end="")
64
try:
65
while True:
66
- N = int(input().strip())
+ N = int(input("Enter: ")).strip()
67
if N < 0:
68
print("\n********* Goodbye!! ************")
69
break
0 commit comments