Post History
K (oK), 9 bytes {x#0}'!10 Try it online! !10 / pass range your arbitrary number .' / treat those as a list, and evaluate each separately { } / main function...
Answer
#4: Post edited
# [K (oK)], 11 bytes{x#0}'(!10)[Try it online!][TIO-lwwszyyw]- [K (oK)]: https://github.com/JohnEarnest/ok
[TIO-lwwszyyw]: https://tio.run/##y9bNz/7/v7pC2aBWXUPR0EDz/38A "K (oK) – Try It Online"It has taken me days to get here. This is the previous iteration. Was able to tighten it up by switching to int instead of char.(!10) / pass range from 0 to 9 (or your arbitrary number)- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
"*" / printing the asterisk each time
- # [K (oK)], 9 bytes
- {x#0}'!10
- [Try it online!][TIO-m02wxa02]
- [K (oK)]: https://github.com/JohnEarnest/ok
- [TIO-m02wxa02]: https://tio.run/##y9bNz/7/v7pC2aBWXdHQ4P9/AA "K (oK) – Try It Online"
- !10 / pass range your arbitrary number
- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
- 0 / printing the 0 each time
#3: Post edited
# [K (oK)], 14 bytes{x#"*"}.'(!10)[Try it online!][TIO-lws6lix5]- [K (oK)]: https://github.com/JohnEarnest/ok
[TIO-lws6lix5]: https://tio.run/##y9bNz/7/v7pCWUlLqVZPXUPR0EDz/39TAA "K (oK) – Try It Online"It has taken me days to get here.- (!10) / pass range from 0 to 9 (or your arbitrary number)
- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
- "*" / printing the asterisk each time
- # [K (oK)], 11 bytes
- {x#0}'(!10)
- [Try it online!][TIO-lwwszyyw]
- [K (oK)]: https://github.com/JohnEarnest/ok
- [TIO-lwwszyyw]: https://tio.run/##y9bNz/7/v7pC2aBWXUPR0EDz/38A "K (oK) – Try It Online"
- It has taken me days to get here. This is the previous iteration. Was able to tighten it up by switching to int instead of char.
- (!10) / pass range from 0 to 9 (or your arbitrary number)
- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
- "*" / printing the asterisk each time
#2: Post edited
- # [K (oK)], 14 bytes
- {x#"*"}.'(!10)
- [Try it online!][TIO-lws6lix5]
- [K (oK)]: https://github.com/JohnEarnest/ok
- [TIO-lws6lix5]: https://tio.run/##y9bNz/7/v7pCWUlLqVZPXUPR0EDz/39TAA "K (oK) – Try It Online"
- It has taken me days to get here.
(!10) / pass numbers from 0 to 9 (ten in total)- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
- "*" / printing the asterisk each time
- # [K (oK)], 14 bytes
- {x#"*"}.'(!10)
- [Try it online!][TIO-lws6lix5]
- [K (oK)]: https://github.com/JohnEarnest/ok
- [TIO-lws6lix5]: https://tio.run/##y9bNz/7/v7pCWUlLqVZPXUPR0EDz/39TAA "K (oK) – Try It Online"
- It has taken me days to get here.
- (!10) / pass range from 0 to 9 (or your arbitrary number)
- .' / treat those as a list, and evaluate each separately
- { } / main function
- x / number passed from the list
- # / will be 'counted' x many times
- "*" / printing the asterisk each time
#1: Initial revision
# [K (oK)], 14 bytes {x#"*"}.'(!10) [Try it online!][TIO-lws6lix5] [K (oK)]: https://github.com/JohnEarnest/ok [TIO-lws6lix5]: https://tio.run/##y9bNz/7/v7pCWUlLqVZPXUPR0EDz/39TAA "K (oK) – Try It Online" It has taken me days to get here. (!10) / pass numbers from 0 to 9 (ten in total) .' / treat those as a list, and evaluate each separately { } / main function x / number passed from the list # / will be 'counted' x many times "*" / printing the asterisk each time