Answer:
The code in Python 3.7 than answers this question is given below:
def main():
cont = 0
for i in range(1, 12001):
if i%3 == 0 and i%14 == 0:
print(i)
cont += 1
print("{} numbers are divisible by 3 and 14".format(cont))
if __name__== "__main__":
main()
Step-by-step explanation:
#Create the main function, inside this is our logic to solve the problem
def main():
#Define a cont variable that storage the amount of numbers that satisfy the condition given
cont = 0
#For loop between 1 and 12000
for i in range(1, 12001):
#Use the mod function to know if is divisible by 3 and by 14
if i%3 == 0 and i%14 == 0:
#Print the number that satisfy the condition
print(i)
#Refresh the cont variable if the condition is satisfied
cont += 1
#Print the output
print("{} numbers are divisible by 3 and 14".format(cont))
if __name__== "__main__":
#Run the main function
main()