Exclude Multiples of Both 3 and 5 Using continue Statement
Write a Python program to iterate through numbers from 1 to 50. Use the continue statement inside an if block to skip numbers that are simultaneously divisible by both 3 and 5 (multiples of 15). Print all included numbers and calculate their aggregate sum, displaying the total sum at the end.
Solution Code Screenshot
Click image to zoom