Python Tutorial #21 - How to use Function in Python + Bonus in end of video

Published: 13 March 2022
on channel: code with mrql
571
15

Functions:

a) Why we need function?
If we want to use the block of code in same file/different file then we need to repeat/rewrite the code. This will cause duplicate code in our program and If you want to update your code then you need to update in all places

b) What is function
It is a block of code which will only runs when it is called.

c) Advantage:
i) Reusability
ii) Divide complex program into simpler ones
iii) Increases program readability
iv) Reduces chances of error
v) Modifying the program becomes easier

d) Example & Syntax
def function_name():
code

e) Global vs Local variables

Bonus:
How to get builtin function list in python



Keywords used:
def



#code_with_mrql,#python,#vscode,#linux

---- Python ----
Python Step by Step for Beginners -    • Python Step by Step for Beginners  
Python inbuilt(predefined) modules -    • Python inbuilt modules  
Python inbuilt(predefined) functions(Shorts) -    • Python inbuilt functions - #shorts  
Python one-liner series -    • Python one-liner Series  
Python packages and libraries -    • Python packages and libraries  

--- Javascript ---
Javascript Tips & Tricks/ One-liners -    • JS Tips & Tricks / One liners - #shorts  
---- Linux ----

Linux Commands(Shorts) -    • Ubuntu/Linux Commands - #shorts  


---- VS CODE ----
VS CODE and its Extensions -    • VS CODE AND IT'S EXTENSIONS  
VS CODE Tips and Tricks -    • VS CODE TIPS AND TRICKS  


On this page of the site you can watch the video online Python Tutorial #21 - How to use Function in Python + Bonus in end of video with a duration of hours minute second in good quality, which was uploaded by the user code with mrql 13 March 2022, share the link with friends and acquaintances, this video has already been watched 571 times on youtube and it was liked by 15 viewers. Enjoy your viewing!