Re: Ok. This IS homework ...

2006-10-19 Thread Magnus Lycka
Frederic Rentsch wrote: > Once upon a time programmers did things like this: > > BEGIN > | > -->|<- > | | | > | catch input| >

Re: Ok. This IS homework ...

2006-10-16 Thread Frederic Rentsch
Nick Craig-Wood wrote: > Frederic Rentsch <[EMAIL PROTECTED]> wrote: > >> It was called a flow chart. Flow charts could be translated directly >> into machine code written in assembly languages which had labels, tests >> and jumps as the only flow-control constructs. When structured >> pr

Re: Ok. This IS homework ...

2006-10-16 Thread Nick Craig-Wood
Frederic Rentsch <[EMAIL PROTECTED]> wrote: > It was called a flow chart. Flow charts could be translated directly > into machine code written in assembly languages which had labels, tests > and jumps as the only flow-control constructs. When structured > programming introduced for and while

Re: Ok. This IS homework ...

2006-10-16 Thread Frederic Rentsch
spawn wrote: > but I've been struggling with this for far too long and I'm about to > start beating my head against the wall. > > My assignment seemed simple: create a program that will cacluate the > running total of user inputs until it hits 100. At 100 it should stop. > That's not the problem,

Re: Ok. This IS homework ...

2006-10-14 Thread Chris Johnson
spawn wrote: > but I've been struggling with this for far too long and I'm about to > start beating my head against the wall. > > My assignment seemed simple: create a program that will cacluate the > running total of user inputs until it hits 100. At 100 it should stop. > That's not the problem

Re: Ok. This IS homework ...

2006-10-14 Thread Brett Hoerner
spawn wrote: > Actually, they do end. If I > move my "guess" variable outside the outermost loop, then it becomes > infinte. I know, I tried it. Huh? When does "running" ever evaluate to false (therefore breaking either of the loops)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Ok. This IS homework ...

2006-10-14 Thread Rainy
spawn wrote: > > Also, you never break out of your deepest loop, why are you using two > > nested infinite-loops anyway? > > > > Regards, > > Brett Hoerner > > Umm ..because I'm new to programming? Actually, they do end. If I > move my "guess" variable outside the outermost loop, then it bec

Re: Ok. This IS homework ...

2006-10-14 Thread spawn
> Also, you never break out of your deepest loop, why are you using two > nested infinite-loops anyway? > > Regards, > Brett Hoerner Umm ..because I'm new to programming? Actually, they do end. If I move my "guess" variable outside the outermost loop, then it becomes infinte. I know, I trie

Re: Ok. This IS homework ...

2006-10-14 Thread Brett Hoerner
spawn wrote: > while running: > guess = int(raw_input('Enter an integer that I can use to add : ')) > subtotal = guess > while running: > guess = int(raw_input('I\'ll need another number : ')) > running_total = guess + subtotal You keep adding the orig

Re: Ok. This IS homework ...

2006-10-14 Thread Max Erickson
"spawn" <[EMAIL PROTECTED]> wrote: > but I've been struggling with this for far too long and I'm about > to start beating my head against the wall. > -- > > I tried adding an additional "while" statement to capture the > second number, but it didn't seem to solve my proble

Re: Ok. This IS homework ...

2006-10-14 Thread Paul Rubin
"spawn" <[EMAIL PROTECTED]> writes: > That's not the problem, in fact, that part works. It's the adding > that isn't working. How can my program add 2 + 7 and come up with 14? > while running: > guess = int(raw_input('I\'ll need another number : ')) > running_to