DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python triangular number
def triangular_number(n): return sum(range(n + 1))
Source by codereview.stackexchange.com #
PREVIOUS
NEXT
Tagged:
#python
#triangular
#number
ADD COMMENT
Topic
COMMENT
Name
7+6 =
Submit