SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I copy/paste that line into bash, it gives the answer -87.6, which is quite obviously incorrect. It has to be incorrect because the number simply cannot be that large and negative; only 3.6 is subtracted from what has to be a positive number because the operators are all multiplication and division, and all numbers are positive.
The result is actually a voltage, since the energy computation is divided by the electronic charge. This means that the 3.6 is volts, not eV. Looks like something to do with a space charge potential.
It's an energy computation in eV for the maximum energy of electrons emitted from Zinc as a result of incident photons of wavelength 250 nM. Algebraically it is (h c / λ) - φ modified with the charge on an electron as a Joules to eV unit conversion factor. You can't get away with anything on LQ -- no stone left unturned!
@pixellany: yet another reason to learn about python someday.
@sahko: zsh's zcalc is impressive,
@Woodsman: I ruled out KDE-based solutions, wanting to keep the computer KDE-free.
@shadowsnipes: I decided on Speedcrunch after reading reviews and ruling out Galculator as probably large, given its graphing capability although I may come back to it if I ever want a graphing calculator.
For completeness here is a list of all identified calculators, far too many to even look at reviews of them all
For completeness here is a list of all identified calculators, far too many to even look at reviews of them all
Good Grief!!!!
Quote:
There's nothing much to learn about python:
Well......maybe not to do simple arithmetic.....
Code:
Python 2.6.3 (r263:75183, Oct 4 2009, 11:40:05)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sin (30)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'sin' is not defined ##OK--forgot to import the math module
>>> import math
>>> sin (30)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'sin' is not defined ##forgot to say "math.sin"
>>> math.sin(30)
-0.98803162409286183 ##Oops, python works in radians
>>> math.sin(30*pi()/180)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pi' is not defined ##so it's math.pi, maybe?
>>> math.sin(30*math.pi()/180)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable ##Huh?
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help math
File "<stdin>", line 1
help math
^
SyntaxError: invalid syntax
>>> help pi
File "<stdin>", line 1
help pi
^
SyntaxError: invalid syntax
###Arrrrgh!! Am I to believe Python does not know what pi is??????........
>>>
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.