Week 23 - Modulo

posted Jun 2, 2017, 1:13 PM by Attila Lengyel   [ updated Jun 2, 2017, 1:14 PM ]
n = 0
a = int(input("Lower:"))
b = int(input("Upper:"))
for x in range(a,b):
  if x%7 == 0 or x%3 == 0 or x%13 == 0:
    n += 1
print(n)

text = input("Text:")
print(text.count('a') + text.count('A'))
Comments