KnowledgeBoat Logo
|

Informatics Practices

Find errors in the following code fragment.

A = 3
S = A + 10
A = "New"
Q = A / 10

Python Funda

2 Likes

Answer

The error in the given code fragment occurs in the Q = A / 10 line, where it attempts to divide the string "New" by the integer 10. This is not a valid operation and will raise a TypeError.

Answered By

3 Likes


Related Questions