in listing lines - are used to verify the type of input variable 'xline checks whether the input is integer or notif it is not integer that error will be raised by line as shown in lines - similarlylines - are used to verify the type of variable 'ylisting input validation addintvalidation py def addintvalidation( :int* :int)->int'''add two variables (xy)xintegerpostional argument yintegerkeyword argument returntypeinteger ''if type(xis not intvalidate input 'xas integer type raise typeerror("please enter integer value for " if type(yis not intvalidate input 'yas integer type raise typeerror("please enter integer value for " return ( + intadd=addintvalidation( = = print("intadd ="intadd #stradd=addintvalidation("meher " "krishna"#following error will be generated for above command#raise typeerror("please enter integer value for "#typeerrorplease enter integer value for help(addintvalidationlines - will be displayed as output print(addintvalidation __annotations__#{'return'' '' 'decorators decorators are used to add additional functionalities to functions in section section 'xand 'yare validated individuallyhecceif there are large number of inputsthen the method will not be efficient decorator will be used in section section to write the generalized validation which can validate any kind of input add decorators and problems listing is the decoratorwhich prints the name of the function whenever the function is calledthe decorator will be executed first and print the name of the function and then actual function will be executed the decorator defined above the function declaration as shown in line of listing listing decorator which prints the name of function funcnamedecorator py def funcnamedecorator(func)function as input def printfuncname(*args**kwargs)#take all arguments of function as input print("function name:"func __name__print function name return func(*args**kwargsreturn function with all arguments return printfuncname in listing first decorator 'funcnamedecoratoris imported to the listing in line thendecorator is applied to function 'addintdecoratorin line when line calls the function 'addintdecorator'the decorator is executed first and name of function is printedafter that print command at line is executed generalized attribute validation