Program to print all numbers from 10-15 except 13

In this python if else program, we will program to print all numbers from 10-15 except 13

Steps to solve the program
  1. Use for loop with the range function to iterate over all the numbers from 10-15.
  2. During iteration check whether the number is not equal to 13 using an if-else statement.
  3. Print only those numbers.
				
					
for i in range(10,16):
    if i!=13:
        print(i)
				
			

Output :

				
					10
11
12
14
15
				
			

Related Articles

check whether the given input is a string or not.

find the electricity bill.

Leave a Comment