Explorar o código

Multiples of 3 and 5

Adel Qalieh %!s(int64=13) %!d(string=hai) anos
pai
achega
fe565e1584
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      1.py

+ 5 - 0
1.py

@@ -0,0 +1,5 @@
+summation = 0
+for i in range(1000):
+	if (i % 3 == 0) or (i % 5 == 0):
+		summation += i
+print summation