मराठी

What is the difference between default Parameters and positional parameters in Python? - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

What is the difference between default Parameters and positional parameters in Python? 

फरक स्पष्ट करा
Advertisements

उत्तर

  Default Parameters Positional Parameters
1. These are parameters that have a predefined value assigned in the function header. These are parameters that must be passed in the correct order during a function call.
2. If no value is provided by the caller, the function uses the default value. The caller must provide a value for every positional parameter; otherwise, an error occurs.
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×