Programming Examples

Write a Program to print all numbers from 0 to 6 except 3 and 6.


Write a Program to print all numbers from 0 to 6 except 3 and 6.

Solution

for i in range(7):
    if i == 3:
        continue
    print(i)
▶ RUN

Output/ Explanation:

0

1

2

4

5

Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad