Question #238855

 Write your own unique Python program that has a runtime error. Do not copy the program from your textbook or the Internet. Provide the following.

  • The code of your program.
  • Output demonstrating the runtime error, including the error message.
  • An explanation of the error message.
  • An explanation of how to fix the error.

Expert's answer

def ​stop_it(): #python 2.7print('stop')
 ​stop_it()

stop_it()


we need to stop infinite recursion

k = 0
def stop_it(): 
  print('stop')
  k += 1
  if k < 5:
      stop_it()

stop_it()
LATEST TUTORIALS
APPROVED BY CLIENTS