[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I need help with making my claculator

On 20/05/2017 14:49, Steve D'Aprano wrote:
> On Sat, 20 May 2017 09:13 pm, bartc wrote:

>> Try running the program.
>> (I did that but I can't follow this style of coding so can't help.)
> Chris is within his rights to refuse to run untrusted code downloaded over
> the internet.
> It's not even the security aspect: the code is fairly short, and doesn't
> appear to be obfuscated or do anything nasty.
> But its a matter of fairness: we're volunteers, not slaves or paid workers,
> and we get to choose on what problems we work on.

I think of these as little puzzles to solve.

And in this case, it had a nifty little display; but I couldn't even get 
to the point where I could use that display setup as a start point and 
add my own logic to make it work.

(Could such a program be implemented using simple linear logic? I dusted 
off some old, half-finished graphics library of mine [not Python] and 
tried emulating a 4-function calculator. The answer was yes, it could. 
For a simple app like this, you don't need classes or lambdas or 
whatever else it is using; a simple loop will do.)

> We're not being paid to solve people's problems, we're doing it from a sense
> of community (and maybe to show off, a bit). We've only got so much time
> and energy for solving people's problems, and the more vague those problems
> are, the less likely we are to care enough to put the work in to solve it.
> Give us an interesting problem, and some of us will put *hours* of work into
> it. But give us something vague or boring or trivial, and What's In It For
> Us?

OK, if I ever get stuck with a Python problem, I'd better make it 
interesting then!