Q:

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

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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:
0 1 3 4 5 6 7 9 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Write a Python program that accepts a string and c... >>
<< Write a Python program to get the Fibonacci series...