Skip to Search
Skip to Navigation
Skip to Content
Community
|
Code
|
Docs
|
Downloads
▼
Perl
Python
Tcl
Komodo IDE
|
more
▼
Lists
Support
PPM Index
PyPM Index
Welcome, guest
|
Sign In
|
My Account
|
Store
|
Cart
ActiveState Code
»
Recipes
Languages
Tags
Authors
Sets
Recipe 578481 revision 1
def
solve
(
eq
,
var
=
'x'
):
eq1
=
eq
.
replace
(
"="
,
"-("
)+
")"
c
=
eval
(
eq1
,{
var
:
1j
})
return
-
c
.
real
/
c
.
imag
« Back to Recipe 578481
History
revision 1
(11 years ago)
x
Undo