Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(at': 0.03; 'rows': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'columns': 0.16; 'hollow': 0.16; 'subject:program': 0.16; 'input': 0.18; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'aligned': 0.29; "aren't": 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'help': 0.40; 'from:no real name:2**0': 0.60; 'square,': 0.84 Newsgroups: comp.lang.python Date: Wed, 12 Dec 2012 09:22:30 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.190.86.113; posting-account=zv4XYQkAAAC4BsteB5zZDKaWPl54XC-t References: <1aa414f0-1e4c-424b-abc6-8e681631788b@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 90.190.86.113 MIME-Version: 1.0 Subject: Re: Hollow square program From: siimnurges@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355332959 news.xs4all.nl 6886 [2001:888:2000:d::a6]:52839 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34702 Well, I did some modifications and got a hollow square, but the columns aren't perfectly aligned with the rows (at least if input is 5. Thanks for the help :) rows = int(input()) s1="* "*rows s2="*"+(rows-2)*" "+"*" print(s1) for s in range(rows-2): print(s2) print(s1)