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


Groups > comp.lang.python > #54059

Re: Expected an indented block

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Expected an indented block
Date 2013-09-12 15:57 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <l0so8v$p43$1@reader1.panix.com> (permalink)
References <eba80aa0-d13d-45ca-ba5e-f0006d7721e3@googlegroups.com>

Show all headers | View raw


In <eba80aa0-d13d-45ca-ba5e-f0006d7721e3@googlegroups.com> altugozgercek@gmail.com writes:

> Hey guys ! its my first topic and I'm gonna start with a problem :) Im
> totally beginner in Python and each time I try to run this program it
> gives me the error down below:

> http://imgur.com/ufUAMTs

That error involves the previous program line, which your screenshot
doesn't show, so it's hard to say exactly what the problem is.

However, I'll take a guess that the previous line is an "if" statement,
which requires that the following line be indented.  Did you indent the
print statement?

This error can also be caused by using a mix of tabs and spaces on the
same line.  Don't do that.

(And by the way, it's generally better to post errors and code as text
instead of a screenshot.)

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

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


Thread

Expected an indented block altugozgercek@gmail.com - 2013-09-12 08:43 -0700
  Re: Expected an indented block John Gordon <gordon@panix.com> - 2013-09-12 15:57 +0000
  Re: Expected an indented block Chris Angelico <rosuav@gmail.com> - 2013-09-13 01:51 +1000

csiph-web