beginners help

Matimus mccredie at gmail.com
Thu Feb 7 10:27:26 EST 2008


On Feb 7, 7:53 am, Guido van Brakel <guidovb1 at invalid> wrote:
> Hello
>
> I totally new to python and i'm doing a python course now. Maybe someone
> could help me a little bit here:
>
> I need to create this script.
>
> If i enter a center digit like 5 for example i need to create two
> vertical and horzitonal rows that looks like this. If i enter 6 it shows
> 6 six starts. How can i do this, because i don't have any clue.
>
> *****
> *   *
> *   *
> *   *
> *****
>
> Kind Regards,
>
> --
> Guido van Brakel
> --

If you turn this in you will be rewarded for your effort :)
[code]
side = input("How many stars on a side?:")
if side == 5:
    print "*****"
    print "*   *"
    print "*   *"
    print "*   *"
    print "*****"
elif side == 6:
    print "******"
    print "*    *"
    print "*    *"
    print "*    *"
    print "*    *"
    print "******"
[/code]



More information about the Python-list mailing list