![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re^2: solve cubic equations (Python)by no_slogan (Deacon) |
on May 03, 2017 at 16:40 UTC ( #1189419=note: print w/replies, xml ) | Need Help?? |
Not sure what the advantage of Python is in this case. Your code is basically the same, except that it doesn't have any dollar signs or semicolons. I never liked Python's "x if cond else y" as a replacement for "cond ? x : y", it just doesn't seem right to put the condition in the middle of the expression. But I have to admit that Python's built-in multiple precision ints are a huge advantage for certain kinds of math programming.
In Section
Cool Uses for Perl
|
|