I was following along with a video discussing the basics of using argparse by calculating a Fibonacci number. I typed the code into my pycharm editor and when I run the code I don't get any output. It completes with the following message "Process finished with exit code 0". Thoughts?
import argparse
def fib(n):
a, b = 0, 1
for i in range(n):
a, b = b, a + b
return a
def Main():
parser = argparse.ArgumentParser()
parser.add_argument("num", help="Fibonacci number to calculate", type=int)
args = parser.parse_args()
result = fib(args.num)
print("The " + str(args.num) + "th fib number is " + str(result))
if __name__ == '__Main__':
Main()