Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51838

Re: Python: Code is ignoring the if and else

References <c6702eb3-494a-4359-84ef-d6679c09df35@googlegroups.com> <dfa6368b-565b-4512-8755-ef36fd2719cd@googlegroups.com> <b16bb894-a720-4e0c-a3ce-d699afffeb8e@googlegroups.com>
Date 2013-08-03 02:56 +0100
Subject Re: Python: Code is ignoring the if and else
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.141.1375494990.1251.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Aug 3, 2013 at 2:44 AM,  <kevin4fong@gmail.com> wrote:
> Yeah, I already know about that. But if I try to change it, I'm not even able to start the program. If I try to change the if statement that it corresponds with, I get a an error saying "card" is not a global. And if I try to shift it in, for some reason...the program runs through the MISS line multiple times.

Okay. Stop, take a step back, and simplify your problems. You're
currently exhibiting a technique of shotgun programming that may be
getting in your way; you're just trying things without really knowing
what you're doing. Play with individual control structures in
interactive Python (eg IDLE), and get to know what's really happening.
Read the docs. Be sure you're structuring your code the way you think
you are. You'll find everything easier once you understand why your
code is doing what it's doing.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python: Code is ignoring the if and else kevin4fong@gmail.com - 2013-08-02 17:40 -0700
  Re: Python: Code is ignoring the if and else MRAB <python@mrabarnett.plus.com> - 2013-08-03 02:38 +0100
  Re: Python: Code is ignoring the if and else John Ladasky <john_ladasky@sbcglobal.net> - 2013-08-02 18:39 -0700
    Re: Python: Code is ignoring the if and else kevin4fong@gmail.com - 2013-08-02 18:44 -0700
      Re: Python: Code is ignoring the if and else Chris Angelico <rosuav@gmail.com> - 2013-08-03 02:56 +0100
      Re: Python: Code is ignoring the if and else Joshua Landau <joshua@landau.ws> - 2013-08-03 03:11 +0100
        Re: Python: Code is ignoring the if and else kevin4fong@gmail.com - 2013-08-02 19:24 -0700
          Re: Python: Code is ignoring the if and else Terry Reedy <tjreedy@udel.edu> - 2013-08-03 01:04 -0400
            Re: Python: Code is ignoring the if and else kevin4fong@gmail.com - 2013-08-03 13:12 -0700
  Re: Python: Code is ignoring the if and else Terry Reedy <tjreedy@udel.edu> - 2013-08-02 21:42 -0400
    Re: Python: Code is ignoring the if and else kevin4fong@gmail.com - 2013-08-02 18:46 -0700
  Re: Python: Code is ignoring the if and else Dave Angel <davea@davea.name> - 2013-08-03 03:34 +0000

csiph-web