DAY 10 (CODE INFINITY)

Hey everyone!! Hope you are enjoying it there are many more interesting topics in it  as everybody says python is amazing language it has simple syntax much like English language , you guys know I am pretty much confused about which thing to learn first DSA or Web development or App development but main thing is start with anything with the time you will learn everything  with this thought let's start our Today's topic Functions interesting topic simply we can make anything function for which you write a code of let say 10 lines or 20 lines even if it is of 2 lines but you have to use it multiple times in your programme so simply you can define it as a function in starting and use it anywhere in the code.

Functions are of two types:

1. Built-in function (pre defined in python) : some examples- min(), max(), len(), sum(), type(), range(), dict(), list(), tuple(), set(), print() etc. 

2. User defined (which user can define)

built-in are pre coded in python and we already use most of built-in functions previously so let's define some functions as we have to take mean of function now we will define mean as a function :

#function for mean of two numbers

def mean(a, b):

  m=(a +b)/2

  print(m)

also defined many other functions like function for isgreater , geometric mean etc you all can check out them on the given Link of  repel:

https://replit.com/@shwetaantil97/DAY-10-Functions#main.py

Screenshot  of repel is not enough for this topic to learn and clear things in mind so my advice is use repel for this in which i have write everything in detail:




  

Comments

Lusia said…
Great Content 👍💯

Popular posts from this blog