[docs] Request for python programming assistance

Tebogo Mokwena trmokwena at gmail.com
Wed Apr 4 21:40:46 CEST 2012


Hi
My name is Tebogo Mokwena, a South African first year computer science
student at the University of Cape Town and a first time programmer. I have
downloaded almost all the tutorials on u-tube and I am very thsnkful that
you are helping so much in the tutorials. I still need to master tricks
when dealing with loops because I can analyse them but creating my own
programs with loops is sometimes a problem. I specifically need help with
creating programs that draws shapes as the output for example:

>>Enter height:
>>6
expected output:

*********
*******
*****
***
**
*
or

>>Enter height:
5
expected output:

             *
            ***
           *****
         ********
       ***********
 or
>>Enter height:
>>9

oexpected output:

*
***
*****
*******
*********
*******
*****
***
*


>>Enter height:
5
expected output
  *
 ***
*****
 ***
  *

>>  Enter height:
7
   *
  ***
 *****
*******
 *****
  ***
   *

Ultimately I would like your help in order to find a precise formula or at
least a technique on how to determine a formula to derive any shape as an
ouput like above. Please help me find the codes and please include detailed
comments for me to undestand how you found the formulas.
I also attached a document of an expected output of a function called
forest and the task is to find the codes for the function which should
yield the exact output attached

Your assistance with enormously be appreciated

With great thanks
Tebogo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120404/54579999/attachment.html>


More information about the docs mailing list