Write a program that, in a sequence of natural numbers, determines the number of multiples of 3.

Write a program that, in a sequence of natural numbers, determines the number of multiples of 3. The program receives as input the number of numbers in the sequence, and then the numbers themselves. The sequence always contains a multiple of 3. The number of numbers does not exceed 100. The entered numbers do not exceed 300. The program should display one number – the number of multiples of 3.

(To solve the problem, the programming language – Python version 3.6.4 will be used).
Let’s create an empty array, let’s take it for – a. This array will be sequentially filled with elements that the user will enter from the keyboard. Let’s take the number of elements as – n.

All elements of the array will be iterated over using a for loop, and thanks to the if condition, we find among them elements with values ​​that will be multiples of three. We count the number of such elements. As a result, we get the following program:

a = []
n = int (input ())
k = 0
for i in range (0, n):
b = int (input ())
a.append (b)
for i in range (0, n):
if a [i]% 3 == 0:
k + = 1
print (k)



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.