#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Python generate n points


    generate N point show the n points generated at the console. Zone must be bounded by the "=" symbol and all multiples of 5 are marked with the symbol + and mutiples 10 with the # symbol :
    if x_max is 10 and y_max is 10
    n=3 and are (1,1) (2,3) (5,4)
    we shoul have

    =1 ===+==== #=
    = x . . . . . . . . .=
    = . . . . . . . . . .=
    = . x . . . . . . . .=
    = . . . . . . . . . .=
    + . . . x . . . . . .+
    = . . . . . . . . . .=
    = . . . . . . . . . .=
    = . . . . . . . . . .=
    = . . . . . . . . . .=
    = . . . . . . . . . .=
    =1====+====#=

    CAN you help me please
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,837
    Rep Power
    480
    Code:
    grid=[list('.'*10)for i in range(10)]
    grid[2][3] = 'x'
    print('\n'.join(' '.join(L) for L in grid))
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo