11.2k views
24 votes
100 POINTS

What error will occur if this is the first line of a program?

num = 100/0

A.
NameError

B.
ZeroDivisionError

C.
TypeError

D.
SyntaxError

User Kael
by
4.0k points

2 Answers

4 votes

ZeroDivisionError

See

  • any no divided by 0 tends to infinity or equal to infinity
  • In math it's applicible but not in python or other codings.

So option B is correct

User Sunil Shah
by
4.0k points
7 votes

Answer:

D. syntax error

Step-by-step explanation:

num = 100/0 ;

User Tom Maxwell
by
4.5k points