title: How do I make the Python program to execute itself again?
body: <p>I'm new to Python and I'm trying to write a program that keep running asking for new inputs. I want to create a file such that it opens the command prompt asking the user to input some values. The user inserts the inputs, the program returns a answer and it restarts so the user will be able to insert new inputs to get new answers. It will be done until the user closes the command window.</p>
  
  <p>I created a code that give to me the weekday of any date in Gregorian Calendar. I used John Conway's "Doomsday Algorithm" to write the program. It works fine when I run it. I created a input section where the program asks for the Day, Month and Year. Look my following code:</p>
  
  <pre class="lang-py prettyprint-override"><code>#The first part of my doomsday algorithm here (this is to large to simple paste here).
  #The last part is creating the last function, that will evaluate everything
  
  def semana(d,m,a):
  
  #definition of the function "semana". 
  #I'm Brazilian and this is the portuguese word for "week". 
  #Then I insert the input strings here:
  
  x=eval(input("Dia:"))
  y=eval(input("Mês:"))
  z=eval(input("Ano:"))
  
  semana(x,y,z)
  
  </code></pre>
  
  <p>I run the program on command prompt and I enter the values for the variables <code>x</code>,<code>y</code> and <code>z</code>, I press enter and the program shows the correct answer, but it terminates itself right after the answer appears.</p>
  
  <p>I want to know how to make the program to restart in the same window. What I mean is: I insert the values for <code>x</code>,<code>y</code> and <code>z</code>. Then I press enter and the program shows the answer. Then it asks again for the input so I will be able to keep inserting values and receiving the weekday as answer.</p>
  
  <p>Thanks in advance!</p>