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


Groups > comp.lang.python > #67342

Re: Boxes of O's

Date 2014-03-01 19:41 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: Boxes of O's
References <c753ba44-379b-4322-96c0-4ba5cb8fa7c1@googlegroups.com> <mailman.7529.1393701408.18130.python-list@python.org> <31bde8f6-25a6-484f-af6b-bbef7f7a0fdf@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.7530.1393703078.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2014-03-01 19:28, geniusrko@gmail.com wrote:
> Well, This is what i got
>
> n = int(input("enter number of o: "))
>
> for i in range(n):
>      print("O", end = '')
>      for j in range(n* 2):
>          print("O", end = '')
>
>      print()
>
 From the examples:

   The first row has n*2 of 'o'
   There are n-2 middle rows, each with 'o', then n*2-2 spaces, then 'o'
   The last row has n*2 of 'o'

Incidentally, in your code you're writing 'O', not 'o'.

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


Thread

Boxes of O's geniusrko@gmail.com - 2014-03-01 11:12 -0800
  Re: Boxes of O's Chris Angelico <rosuav@gmail.com> - 2014-03-02 06:16 +1100
    Re: Boxes of O's geniusrko@gmail.com - 2014-03-01 11:28 -0800
      Re: Boxes of O's MRAB <python@mrabarnett.plus.com> - 2014-03-01 19:41 +0000
      Re: Boxes of O's Chris Angelico <rosuav@gmail.com> - 2014-03-02 06:54 +1100
        Re: Boxes of O's geniusrko@gmail.com - 2014-03-02 06:43 -0800
          Re: Boxes of O's Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-02 14:56 +0000
          Re: Boxes of O's Glazner <yoavglazner@gmail.com> - 2014-03-02 13:30 -0800
          Re: Boxes of O's Michael Torrie <torriem@gmail.com> - 2014-03-02 14:48 -0700
      Re: Boxes of O's Dave Angel <davea@davea.name> - 2014-03-01 22:04 -0500

csiph-web