How do I have a program restart itself automatically rather than ending?

In Learn Python 2’s “Area Calculator” program, you have to continue writing “python AreaCalculator.py” every time you enter a number and want to use the calculator again.

How do I set the calculator to automatically start after it gives me an answer?

1 Like

You could put the function that you call in a loop.

for example:

running = true
while (running):
     AreaCalculator(user.input)

make sure you create a way to exit the loop tho. Its very anoying to have a program run that cant close.

1 Like