मराठी

Write one example of the following in Python: Syntax Error - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Write one example of the following in Python:

Syntax Error

अति संक्षिप्त उत्तर
Advertisements

उत्तर

if x = 50:
    print("Hello")

In this statement, the assignment operator (=) is used instead of the comparison operator (==). This results in a syntax error because Python does not allow assignment in a condition.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×