Post Page Advertisement [Top]

python program

how to make a program in python which is never break ?

Never break means the program will automatic restart

for make a program which will never break mean execute automatically we need to use while 1: in starting of the code 

for example:-

writing a program to check any number is even or odd

while 1:
    x=input("Enter A Number")
    y=x%2
    if y==0:
        print(x,"is an Even Number")
    else:
        print(x"is a Odd Number")

Thank-you

No comments:

Post a Comment

Bottom Ad [Post Page]