diff --git a/NewmanConwaySequence.py b/NewmanConwaySequence.py index 9b7931f8..acf64c7b 100644 --- a/NewmanConwaySequence.py +++ b/NewmanConwaySequence.py @@ -1,7 +1,7 @@ def newmanConwaySequence(n): - if n==1 or n==2: + if n == 1 or n == 2: return 1 - return newmanConwaySequence(newmanConwaySequence(n-1))+newmanConwaySequence(n-newmanConwaySequence(n-1)) + return newmanConwaySequence(newmanConwaySequence(n-1)) + newmanConwaySequence(n-newmanConwaySequence(n-1)) -n=int(input("Enter a number")) -print(newmanConwaySequence(n)) \ No newline at end of file +n = int(input("Enter a number: ")) +print(newmanConwaySequence(n))