Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which of the following is an example of a logical error? a. ending a st…

Question

which of the following is an example of a logical error?
a. ending a statement with a period in a language that requires a semicolon
b. using the word start when a language requires begin
c. dividing by 3 when you meant to divide by 30
d. starting a statement with an uppercase letter in a language that requires all lowercase

Explanation:

Brief Explanations

A logical error occurs when the program runs without crashing but produces incorrect results due to wrong logic. Dividing by 3 instead of 30 is a logical error. Options A, B, and D are syntax - related errors where the code violates the language's grammar rules.

Answer:

C. dividing by 3 when you meant to divide by 30