Using lambda functions to solve Algebra

0 votes
How can python lambda functions be used to solve Algebraic equations?
Jun 17 in Python by Wajiha
• 1,920 points
21 views

1 answer to this question.

0 votes

Python lambda functions can be used to solve algebraic expressions as follows:

Linear Equations:

As we all know, linear equations are equations with degree one. For example 2x+3y. Now let's solve the same using lambda functions

Example:

s=lambda x,y: 2*x+3*y
s(3,5)

Output: 21

Quadratic Equations:

These are equations with degree 2. For example (x+y)^2

EXAMPLE:

s=lambda x,y: (x+y)**2
s(3,5)

OUTPUT: 64

answered Jun 17 by anonymous

Related Questions In Python

0 votes
1 answer

How can I write a program to add two numbers using functions in python?

def add(a,b):      return a + b #when i call ...READ MORE

answered May 20 in Python by Mohammad
• 3,060 points
69 views
0 votes
1 answer
+1 vote
1 answer

how to run list of functions using Thread?

You could import the file with function ...READ MORE

answered Aug 26 in Python by Vishaka
17 views
+2 votes
2 answers

How to make a laplacian pyramid using OpenCV python?

down voteacceptTheeThe problem is that you're iterating ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,720 points
1,256 views
0 votes
1 answer

Why are Python lambdas useful?

The main purpose of anonymous functions come ...READ MORE

answered Jun 19 in Python by Wajiha
• 1,920 points
26 views
0 votes
1 answer

How Lambda() is used with filter() in python?

The filter() function in Python takes in ...READ MORE

answered May 20 in Python by Rakshi
23 views
0 votes
1 answer

What happens when you use lambda inside lambda?

Yes you can use lambda inside lambda. ...READ MORE

answered Jun 19 in Python by Wajiha
• 1,920 points
17 views
0 votes
1 answer
0 votes
1 answer

What is the purpose of using lambda functions in Python?

The main purpose of anonymous functions come ...READ MORE

answered Jun 11 in Python by Nisa
• 1,090 points
37 views