Answers for "sum 1 to 10 in python"

2

sum of any numbers in python

sum(list(map(int,input().split())))
Posted by: Guest on December-02-2020
0

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
Posted by: Guest on July-14-2021

Python Answers by Framework

Browse Popular Code Answers by Language