Computer Science, asked by bhuvanesh16301, 4 months ago

Fill in the blank. The three main types of errors are syntax errors, logic errors and _________ errors. Type the correct answer into the text box.

Answers

Answered by IshaniDatta
0

Answer:

runtime errors

Explanation:

Hope It Will Help.....

Pls Mark Brainliest

Answered by ahmadfardeen571
0

Answer:

The three main types of errors are syntax errors, logic errors and runtime errors.

Explanation:

Syntax Error: A syntax error means that the text of your program is illegal in terms of the language you are using.

For example, in Python an if statement looks like:

if y == 0:

print("y is 0")

But if I wrote:

if y = 0:

print("y is 0")

then I would get a syntax error, because you are not allowed to use assignment in an if-condition.

Logical Error: A logical error means that the code is legal, but will probably do something stupid. It means that the programmer made a mistake. The program will probably run, but will do something unexpected.

For example:

a= 1

while a > 0:

a = a + 1

print(a)

That is a perfectly legal program, but the while loop never ends, because a is always greater than 1.

Runtime Error: A runtime error means that during execution the program ran into something it couldn’t handle - for example, trying to divide by 0:

a = 20

y = 17

while a >= 0:

y = y / a

a = a - 1

a will count down to zero, and when n equals zero, the program will do the last pass through the loop, and will try to calculate y = y/0. You will probably get a error at this point - a runtime error.

#SPJ2

Similar questions