मराठी

While defining a function in Python, the positional parameters in the function header must always be written after the default parameters. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

While defining a function in Python, the positional parameters in the function header must always be written after the default parameters.

पर्याय

  • True 

  • False

MCQ
चूक किंवा बरोबर

उत्तर

The statement is False.

Explanation:

In Python, positional parameters must always be written before the default parameters in a function header, not after. Python reads parameters left to right. Once a default value is provided, all the parameters must also have default values — otherwise, it gets confused during function calls.

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

Englishहिंदीमराठी


      Forgot password?
Use app×