In this program, we will print certain numbers.
Steps to solve the program
- Use for loop to iterate over numbers from 1-10.
- Print all the numbers except 5 and 6.
- Use If statement for this purpose.
for i in range(1,11):
if i != 6 and i != 5:
print(i,end="\n")
Output :
1
2
3
4
7
8
9
10