ok i get letter s and j, now i neetd them to be printed together for i in range(3): print '*'*5 if i in range(0,1): print '*' if i in range(1,2): print ' ' * 4 + '*' *** **for i in range(4): print ' ' * 3 + '*' if i in range(3,4): print '*
i did it. for i in range(3): print '*' * 5 + '\t *' if i in range(0,1): print '*'+' ' *4 + '\t *' if i in range(1,2): print ' ' * 4 + '* * *' is this code ok? someone have better solution? thx!
Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Be
"josip" <[EMAIL PROTECTED]> wrote
>i did it.
Well done!
> for i in range(3):
>print '*' * 5 + '\t *'
>if i in range(0,1):
range(0,1) is [0], so you could just do
if i == 0:
>print '*'+' ' *4 + '\t *'
>if i in range(1,2):
similarly range(1,2) is [1] so
if i == 1:
>
> i did it.
Cool; I'm glad to see that you could do it.
[code cut]
Yes, it's mostly an exercise for you to get comfortable using multiple
statements. Personally, I think your instructor should have made the
first assignment something dealing with expressions rather than print
statements, bu
Some time ago, I had read an article on Guido's blog (I think) about ways to improve the main() functionin a Python script. There were many replies, and I thought I would try to implement some of these ideas.
I had found that in every python program I wrote I would 1. check the number of arguments
On 21/08/06, Tony Cappellini <[EMAIL PROTECTED]> wrote:
> 1. check the number of arguments as well as checking that each argument was
> valid.
> 4. If the argument validation failed, a Usage() function would be called to
> show all possible arguments
> 5. Provide a "help" option to display all the