जब आप निम्नलिखित कोड निष्पादित करते हैं तो क्या त्रुटि होगी?
What error will occur when you execute the following code?
MANGO = APPLE
A)
B)
C)
D)
Explanation:
The code:
MANGO = APPLE
- In this case,
APPLE
is not defined before it is used, so Python will raise a NameError because it doesn't recognizeAPPLE
as a defined variable.
The correct answer is:
(A) Name error.