Python Integer Program

Hi I need some help on making a python program that reads an integer from a user... and it should print out a series of * characters that form a right triangle..

Some sample output:
Enter an integer: 3
*
**
***

Enter an Integer: 4
*
**
***
****

It should look like that...

This is what i have so far:
integer = input("Enter an Integer:")
if (integer>0):
b = integer
h = integer
a = 0.5*b*h
print a

Not sure how to go on?
Thanks everyone for the help!
This is a C and C++ forum. You want a Python forum.
http://www.python-forum.org/pythonforum/index.php

You will need two loops:
- an outer loop to count 1 to (whatever the user input)
- an inner loop to draw asterisks

BTW, avoid the input() function - it endeavors to execute any code the user types in. Use
int(raw_input("Enter an Integer:"))

instead. See
http://docs.python.org/library/functions.html#input
http://docs.python.org/library/functions.html#raw_input

Hope this helps.
Topic archived. No new replies allowed.