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)

m
#Define and implement bold_tag

er as
def bold_tag(func):

co
def inner(*args, **kwdargs):

eH w
return '<b>'+func(*args, **kwdargs)+'</b>'
return inner

o.
def say(msg):
rs e
ou urc
return msg

say = bold_tag(say)
o

4)#Implement italic_tag below


aC s

#Add greet() function definition


v i y re

#Add greet() implementation here


ed d
ar stu
sh is
Th

This study source was downloaded by 100000827046007 from CourseHero.com on 11-27-2021 07:52:58 GMT -06:00

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

You might also like