You are on page 1of 1

1)Decorator 1:

#Add log function and inner function implementation here

def log(func):
def inner(*args, **kwdargs):
STDOUT= "Accessed the function -'{}' with arguments {}
{}".format(func.__name__,args,kwdargs)
return STDOUT
return inner
def greet(msg):
'Greeting Message : ' + msg

greet = log(greet)

2)Decorator 2:

#Add greet function definition here


@log
def average(n1,n2,n3):
return (n1+n2+n3)/3

3)
#Define and implement bold_tag
def bold_tag(func):
def inner(*args, **kwdargs):
return '<b>'+func(*args, **kwdargs)+'</b>'
return inner

def say(msg):
return msg

say = bold_tag(say)

4)#Implement italic_tag below


#Add greet() function definition
#Add greet() implementation here

This study source was downloaded by 100000805187466 from CourseHero.com on 06-14-2022 04:01:43 GMT -05:00

https://www.coursehero.com/file/77656402/Python-apln-pgmng-hands-on-3txt/
Powered by TCPDF (www.tcpdf.org)

You might also like