Write a Python program that prints all the numbers from 0 to 10 except 2 and 8


Introduction

Write a Python program that prints all the numbers from 0 to 10 except 2 and 8. I have used python 3.7 compiler for debugging purpose.


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. for x in range(10):
  2. if (x == 2 or x== 8):
  3. continue
  4. print(x,end=' ')
  5. print("\n")

Result

python language techstudy.org

     





Related Topics




Popular Posts