[Type C]Q6. Write a program that creates a list of all integers less than 100 that are multiple of 3 or 5.

Program code:

Clear Doubts with Computer Tutor
In case you’re facing problems in understanding concepts, writing programs, solving questions, want to learn fun facts | tips | tricks or absolutely anything around computer science, feel free to join CTs learner-teacher community: students.computertutor.in

Output:

[3, 5, 6, 9, 10, 12, 15, 18, 20,
 21, 24, 25, 27, 30, 33, 35, 36,
 39, 40, 42, 45, 48, 50, 51, 54,
 55, 57, 60, 63, 65, 66, 69, 70,
 72, 75, 78, 80, 81, 84, 85, 87,
 90, 93, 95, 96, 99, 100]

Initialize a for loop with specified range and conditions to check if the number in the range is divisible by 3 and 5. Print only the numbers which satisfy this condition.

Basic python functionality is demonstrated in above program.

To view all the lessons in chapter 1: http://computertutor.in/class-12-computer-science/chapter-2/

To view entire class 12 computer science study material: http://computertutor.in/resources/

You cannot copy content of this page