Monday, December 21, 2020

python day 15 functions

 # -*- coding: utf-8 -*-

"""

Created on Tue Dec 22 07:28:09 2020

day 15

topic: functions continue 3


@author: anil


def my_funtion(a):

    print("inside my function",a)

    return "kasjfdklfhasjfhdjakfhjdsfhjakfhjhfjkdsahfjdahdsfjhfdsjhfjkadshfhsafjkhsdf"

    



a=my_funtion(5)

b='c'

print(type(b))

print("this is my main functions:",a,b)




def my_funtion(a):

    print("inside my function",a)

    return "bahubali"

a=my_funtion(5)

print(type(a))

b='c'

print(type(b))

print("this is my main functions:",a,b)




def my_funtion(a):

    print("inside my function",a)

    return a



a=my_funtion(5)

print(type(a))

b='c'

print(type(b))

print("this is my main functions:",a,b)



def my_funtion(*a):

    print("inside my function",a)

    return a



a=my_funtion(5)


print("this is my main functions:",a)




def my_funtion(*a):

    print("inside my function",a)

    return "bahubali",a,"praveen",a,a,a,a,a,a,a



a=my_funtion(5)


print("this is my main functions:",a)




def my_funtion(*a):

    print("inside my function",a)

    return ("bahubali",a,"praveen",a,a,a,a,a,a,a)



a=my_funtion(5)


print("this is my main functions:",a)


def my_funtion(*a):

    print("inside my function",a)

    return ["bahubali",a,"praveen",a,a,a,a,a,a,a]



a=my_funtion(5)

print(type(a))


print("this is my main functions:",a)



def my_funtion(*a):

    print("inside my function",a)

    return {"bahubali",a,"praveen",a,a,a,a,a,a,a}



a=my_funtion(5)

print(type(a))


print("this is my main functions:",a)



def my_funtion(**a):

    print(type(a))

    print("inside my function",a)

    return a



a=my_funtion(a=5,b=3,c=4)

print(type(a))


print("this is my main functions:",a)




def my_funtion(d,**a):

    print(type(a))

    print("inside my function",a,d)

    return a



d="king"

a=my_funtion(d,a=5,b=3,c=4)

print(type(a))


print("this is my main functions:",a)





def my_funtion(a,b,c,*d,**f):

    print(type(a))

    print(type(b))

    print(type(c))

    print(type(d))

    print(type(f))

    

    print("inside my function",a,d)

    return a



d="king"

a=my_funtion(2,3,5,d,x=5,y=3,z=4)

c=5

f=0

g=c/f

print(g)

print(type(a))


print("this is my main functions:",a)



def my_funtion(a,b,c,*d,**f): 

    print("inside my function",a,b,c,d,f)

    return a



d="king"

z,x,y=0,1,2

a=my_funtion(2,3,5,d,z=4,x=5,y=3)

print("this is my main functions:",d,z,x,y)



def my_funtion(a,b,c,*d,**f): 

    print("inside my function",a,b,c,d,f)

    return a,b,c,d,f



d="king"

z,x,y=0,1,2

a=my_funtion(2,3,5,d,z=4,x=5,y=3)

print(type(a))

print("this is my main functions:",a[4]['z'])

"""

def outer_funtion(): 

    a=10

    print("outer function",a)

    

    def inner_funtion(a,*args):

        print("inner function",a+args[0])

        

    inner_funtion(56000000,a)

    

   

    




outer_funtion()


















No comments:

Post a Comment

python class topic video