Question: Problem 3: (3 points) - If we list all the natural numbers below 15 that are multiples of 4 or 7, we get 4, 7,

Problem 3: (3 points) - If we list all the natural numbers below 15 that are multiples of 4 or 7, we get 4, 7, 8, 12, 14. The sum of these multiples is 45. Find the sum of all multiples of 4 or 7 below 162. Note, you will need to make use of the mod command % , which in effect finds remainders from division. Note the use below. Likewise you will also need to use the logical operation or . : # How to use % print(1%2) print(2%2) print(3%2) print(4%2) print() print(11%5) print(12%5) print(13%5) print(14%5) print(15%5) 1 0 1 0 1 2 3 4 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
