Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count numbers that add up to 10 in python

# print numbers that add up to 10. (19 => 1 + 9 = 10)

x = 0

for i in range(100):
	for j in str(i):
		x+=int(j)
        
	if x == 10:
		print(i)
	x = 0
#															- sabz
 
PREVIOUS NEXT
Tagged: #count #numbers #add #python
ADD COMMENT
Topic
Name
2+7 =