Lesson 21 of 34
Functions: ನಿಮ್ಮದೇ Commands
8 min 25 XP
ಒಂದೇ ಕೋಡ್ ಮತ್ತೆ ಮತ್ತೆ ಬರೆಯುತ್ತಿದ್ದೀರಾ? ಅದನ್ನು function ಮಾಡಿ. def ನಿಂದ ಆರಂಭಿಸಿ, ನಂತರ ಹೆಸರು, ( ) ಮತ್ತು :, ಒಳಗಿನ ಕೋಡ್ indent ಮಾಡಿ.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.( ) ಒಳಗೆ parameters ಇಡಿ. Function call ಮಾಡುವಾಗ ಕೊಡುವ values (arguments) ಅವುಗಳಲ್ಲಿ ಬರುತ್ತವೆ.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.Function define (def) ಮಾಡಿದರೆ ಅದು ಓಡುವುದಿಲ್ಲ. ಅದನ್ನು call ಮಾಡಬೇಕು: greet(...)