answer x*(x-1)=0 in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

answer x*(x-1)=0 in Python

How can I find answer x*(x-1)=0 in Python?

19th Oct 2019, 10:07 AM
علی ویس کرمی
علی ویس کرمی - avatar
3 Answers
0
You can use numpy as follow: from numpy import roots print (roots ([1, -1, 0])) And you'll have an array containing answers. Note that [1,-1,0] is a matrix which contains your polynomial coefficients.
19th Oct 2019, 11:59 AM
Qasem
0
Easiest way is to solve the equation in paper/notepad so, that there is only be 1 x on left side, and type the final equation on Python.
19th Oct 2019, 12:21 PM
Seb TheS
Seb TheS - avatar
0
Its such a wonderful online free https://robloxfreerobuxgenerator.com card game so play it now.
25th Sep 2023, 9:59 AM
siya tomar
siya tomar - avatar