old_contents: #!/usr/bin/python
  import os
  
  def main():
  	input = raw_input("What's the shape? ")
  
  	if input == 'triangle':
  		triangle()
  	if input == 'circle':
  		circle()
  
  def triangle():
  	pedestal = input("Pedestal: ")
  	height = input("Height: ")
  
  	result = pedestal * height / 2
  	print "Result:", result
  
  def circle():
  	radiant = input("Radiant: ")
  
  	result = radiant * 2 / 3.14
  	print "Result:", result
  
  if __name__ == '__main__':
  	main()
  
new_contents: #!/usr/bin/python
  import time
  
  def main():
  	input = raw_input("What's the shape? ")
  
  	if input == 'triangle':
  		triangle()
  	if input == 'circle':
  		circle()
  
  def triangle():
  	pedestal = input("Pedestal: ")
  	height = input("Height: ")
  
  	result = pedestal * height / 2
  	print "Result:", result
  	exit()
  
  def circle():
  	radiant = input("Radiant: ")
  
  	result = radiant * 2 / 3.14
  	print "Result:", result
  	exit()
  
  def exit():
  	exit = raw_input("Again? [y]Yes or [n]No: ")
  	if exit == 'y':
  		main()
  	if exit == 'n':
  		time.sleep(0.1)
  
  
  if __name__ == '__main__':
  	main()
  
subject: Exit function