Tech Study

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.

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

Result

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

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

Python Examples

Introduction: Python Examples are the basic programming concepts of python like python syntax,python data types,,python operators,python if else,python comments etc.. …

Read more

C String Functions

C String Functions perform certain operations, It provides many useful string functions which can come into action. The <string.h> header …

Read more