Using lambda functions to solve Algebra

0 votes
How can python lambda functions be used to solve Algebraic equations?
Jun 17, 2019 in Python by Wajiha
• 1,950 points
602 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, 2019 by anonymous

Related Questions In Python

0 votes
1 answer

Solve the quadratic equation using lambda functions in Python

Hello @ Ø§Ù…یرحمزه , from math import sqrt Root = lambda ...READ MORE

answered Jul 13, 2020 in Python by Niroj
• 82,560 points
557 views
0 votes
2 answers

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

there is sum() function as a built ...READ MORE

answered Oct 24, 2020 in Python by anonymous
12,801 views
0 votes
4 answers

how to sort a list of numbers without using built-in functions like min, max or any other function?

I guess you are trying to do ...READ MORE

answered Dec 11, 2020 in Python by Rajiv
• 8,880 points
30,753 views
+1 vote
1 answer

how to run list of functions using Thread?

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

answered Aug 26, 2019 in Python by Vishaka
116 views
0 votes
1 answer

Why are Python lambdas useful?

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

answered Jun 19, 2019 in Python by Wajiha
• 1,950 points
114 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, 2019 in Python by Rakshi
91 views
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, 2019 in Python by Nisa
• 1,090 points
245 views