cottoncandy2426 cottoncandy2426
  • 22-08-2019
  • Computers and Technology
contestada

What is runtime error in Python? Provide an example

Respuesta :

ExieFansler ExieFansler
  • 03-09-2019

Answer:

If the program is syntactically correct means there are no syntax errors in the program the python interpreter will execute the program.But if the program exits unexpectedly then there exists a run-time error in the python program.

For Example:-

  1. Accessing a list element which does not exists.
  2. divide by 0.
  3. Accessing a file which does not exists.
  4. Performing operation on incompatible types.

For ex:-

my_list=[1,34,7,3,7,8]

print(my_list[6])

This code will produce run-time error.

Answer Link

Otras preguntas

Leo has a total of 45c. he has some dimes and pennies . How many  different combinations of dimes and pennies could Leo have?make a table to solve.
is 5/12 bigger than 3/7
Multicellular organisms can be organized into what other levels?
after a fire, the ashes have less mass and take up less space than the trees and vegataion before the fire. how can this be explained in terms of the Law of Con
Circle 6 numbers for a total of 31.8,9,91,5,81,1,1
What is a medial moraine, and how is it formed?
During a soccer season, Mario made approximately 2 goal points for every 5 of his shots on goal.  What is the probability that Marion would make 2 goal points o
Why do the track runners start at different positions on the track?
What features distinguish anthropoids from strepsirrhines
in ancient China, many aspects of life were ruled by the___ of Confucius.