Skip to content

Instantly share code, notes, and snippets.

@christophergregory
Created August 20, 2014 01:55
Show Gist options
  • Save christophergregory/1bb612e9c91395f2192a to your computer and use it in GitHub Desktop.
Save christophergregory/1bb612e9c91395f2192a to your computer and use it in GitHub Desktop.
CSV Builder Solution
# 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