Created
August 20, 2014 01:55
-
-
Save christophergregory/1bb612e9c91395f2192a to your computer and use it in GitHub Desktop.
CSV Builder Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask the user to enter a number | |
number_of_rows = int(raw_input('Enter a number: ')) | |
# Iterate through range of numbers up to what the user entered | |
for row in range(number_of_rows): | |
stars = 1 + row * 2 | |
spaces = number_of_rows - row - 1 | |
print ' ' * spaces + '*' * stars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment