Important Notice:

Course Content
The Calendar Module
Library Function/Predefined Functions
0/4
Sys Module
Library Function/Predefined Functions
0/2
OS Module
Library Function/Predefined Functions
0/2
Functions in Python (Chapter-10) M3-R5
About Lesson

Q 1:- create a lambda function to calculate remainder

rem=lambda a,b:a%b

print(rem(10,3))

Output

1

rem=lambda a,b:a%b

a=int(input(“Enter 1st number “))

b=int(input(“Enter 2nd number “))

result=rem(a,b)

print(“Remainder is : “,result)

 

Q. 2:- find the Square of a number by using lambda function

sq=lambda a:a*a

a=int(input(“enter any number “))

res=sq(a)

print(“Square is “,res)

sq=lambda a:a*a

print(sq(5))

Output

25

error: Content is protected !!