triangles yo

This commit is contained in:
Armen Vartan 2014-12-02 14:57:10 -05:00
parent 688da0ac83
commit 1e293e5904
2 changed files with 17 additions and 18 deletions

View File

@ -1,19 +1,17 @@
####Print a Triangle
##Using nested for loops, print a triangle like so:
`*`
`**`
`***`
`****`
`*****`
`******`
`*******`
`********`
`*********`
`**********`
This triangle is 10 high, but I want the ability to make it as high as I want by setting one variable.
You can print this to the console or to the printout div.
Print a Triangle
================
Using nested for loops, print a triangle like so:
```
>>> triangle(10)
*
**
***
****
*****
******
*******
********
*********
**********
```

View File

@ -0,0 +1 @@
def triangle(num):