Write a program that calculates the product of all even numbers from the interval [1; 20]

To begin with, let’s create two variables a and b, whose values are equal to 1 and 20, respectively. We will also create a variable k equal to zero (in what follows, this variable will denote the product of even numbers from 1 to 20).

Then, using the for loop, we iterate over all the numbers in the given interval and select, thanks to the if condition, only even ones, then we multiply them sequentially.

a = 1
b = 20
k = 1
for i in range (a, (b + 1)):
if i% 2 == 0:
k * = i
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.