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