English

Categorize the following as syntax error, logical error, or runtime error: num1 = 25; num2 = 0; num1/num2 - Computer Science (Python)

Advertisements
Advertisements

Question

Categorize the following as syntax error, logical error, or runtime error:

num1 = 25; num2 = 0; num1/num2

Options

  • Syntax error

  • Logical error

  • Runtime error

MCQ
Short Note

Solution

Runtime Error

The syntax is correct. The error will arise only when the 'interpreter' will run the line containing these statements.

shaalaa.com
Debugging
  Is there an error in this question or solution?
Chapter 5: Getting Started with Python - Exercise [Page 117]

APPEARS IN

NCERT Computer Science [English] Class 11
Chapter 5 Getting Started with Python
Exercise | Q 8. b) | Page 117
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×