Re: Help with my 8-year old son's first program. I'm stuck

2014-01-27 Thread john pierce
First, forget about the def a() statement. def is for defining a function and this is not a function. Second, research the difference between == (logical test) and = (assignment operator). Third, take a look at the length of "op" just after the readline(). You can add a line that says print

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread justinpmullins
Thanks Peter, that did the trick. You've got here a very happy 8-year old and a mighty relieved 46-year old!! On Saturday, January 25, 2014 10:41:20 AM UTC, Peter Otten wrote: > justinpmull...@gmail.com wrote: > > > > > My son is learning Python and I know nothing about computers. > > > He's

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Denis McMahon
On Sat, 25 Jan 2014 02:02:15 -0800, justinpmullins wrote: > def a(): > import sys print("welcome to the calculation") print("please type a > number") > one = int(sys.stdin.readline()) print("type d for division,") > print("type m for multiplication,") print("type s for su

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Peter Otten
justinpmull...@gmail.com wrote: > My son is learning Python and I know nothing about computers. > He's written a simple calculator program that doesn't work. Normally you are supposed to explain what you or your son expect and what you get instead. If Python ends with an error you should paste

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread justinpmullins
PS: At the first statement, we've also tried op == "d": But that doesn't work either. On Saturday, January 25, 2014 10:02:15 AM UTC, justinp...@gmail.com wrote: > My son is learning Python and I know nothing about computers. > > He's written a simple calculator program that doesn't work. F

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Ervin Hegedüs
Hello, On Sat, Jan 25, 2014 at 02:02:15AM -0800, justinpmull...@gmail.com wrote: > My son is learning Python and I know nothing about computers. :) > He's written a simple calculator program that doesn't work. For the life of > me, I can't see why. > Any help gratefully received. Here's his co