Post History
Sandbox
Looping counter [FINALIZED]
#5: Post edited
Looping counter [FINALIZED]
# Looping counter Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk. Instead of the asterisk, any printable, non-whitespace character can be used. However all lines need to use the same character. The beginning of the output looks like this: ```text * ** *** **** ***** ****** ******* ******** ********* ********** *********** ************ ``` An ungolfed Python implementation: ``` from itertools import count for i in count(1): print('*'*i) ```
#3: Post edited
- # Looping counter
Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk.- The beginning of the output looks like this:
- ```text
- *
- **
- ***
- ****
- *****
- ******
- *******
- ********
- *********
- **********
- ***********
- ************
- ```
- An ungolfed Python implementation:
- ```
- from itertools import count
- for i in count(1):
- print('*'*i)
- ```
- # Looping counter
- Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk. Instead of the asterisk, any printable, non-whitespace character can be used. However all lines need to use the same character.
- The beginning of the output looks like this:
- ```text
- *
- **
- ***
- ****
- *****
- ******
- *******
- ********
- *********
- **********
- ***********
- ************
- ```
- An ungolfed Python implementation:
- ```
- from itertools import count
- for i in count(1):
- print('*'*i)
- ```
#2: Post edited
- # Looping counter
- Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk.
- The beginning of the output looks like this:
```- *
- **
- ***
- ****
- *****
- ******
- *******
- ********
- *********
- **********
- ***********
- ************
- ```
- An ungolfed Python implementation:
- ```
- from itertools import count
- for i in count(1):
- print('*'*i)
- ```
- # Looping counter
- Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk.
- The beginning of the output looks like this:
- ```text
- *
- **
- ***
- ****
- *****
- ******
- *******
- ********
- *********
- **********
- ***********
- ************
- ```
- An ungolfed Python implementation:
- ```
- from itertools import count
- for i in count(1):
- print('*'*i)
- ```
#1: Initial revision
Looping counter
# Looping counter Create an infinite loop that outputs lines of asterisks, with each line containing one more asterisk. The beginning of the output looks like this: ``` * ** *** **** ***** ****** ******* ******** ********* ********** *********** ************ ``` An ungolfed Python implementation: ``` from itertools import count for i in count(1): print('*'*i) ```