Re: Newbie question related to Boolean in Python

2013-09-05 Thread Tim Roberts
skwyan...@gmail.com wrote: > ># This is just to show my understanding of Boolean. In line 8-9, if >my input is "taunt bear", the result is true and true, which will >continue the loop. > > So what confused me is line 12-13. if my input is taunt bear, is it >suppose to be taunt bear == "taunt bear

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Steven D'Aprano
On Thu, 05 Sep 2013 16:36:55 -0700, Thomas Yang wrote: > bear_moved = False > > while True: > next = raw_input("> ") > > if next == "take honey": > dead("The bear looks at you then slaps your face off.") > elif next == "taunt bear" and not bear_moved:

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Thomas Yang
bear_moved = False while True: next = raw_input("> ") if next == "take honey": dead("The bear looks at you then slaps your face off.") elif next == "taunt bear" and not bear_moved: print "The bear has moved from the door. You can go through

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Dave Angel
On 5/9/2013 16:08, skwyan...@gmail.com wrote: > 1. bear_moved = False > 2. > 3. while True: > 4.next = raw_input("> ") > 5. > 6.if next == "take honey": > 7.dead("The bear looks at you then slaps your face off.") > 8.elif next == "taunt bear"

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Neil Cerutti
On 2013-09-05, skwyan...@gmail.com wrote: > 1. bear_moved = False > 2. > 3. while True: > 4.next = raw_input("> ") > 5. > 6.if next == "take honey": > 7.dead("The bear looks at you then slaps your face off.") > 8.elif next == "taunt bear" and

Newbie question related to Boolean in Python

2013-09-05 Thread skwyang93
1. bear_moved = False 2. 3. while True: 4.next = raw_input("> ") 5. 6.if next == "take honey": 7.dead("The bear looks at you then slaps your face off.") 8.elif next == "taunt bear" and not bear_moved: 9.print "The bear has moved fro