خرید بک لینک

Vote count: 0

When ruing the program, the user is asked to input a number. If the number is 1, quit the program. If the number is not 1, print the number.

I wonder how to realize this.

I am using python 3.5.

My code is like this. I always get an error: 'break' outside loop

How can I fix this?

x = input('Please input a number: ')
if x == '1':
    print('quit')
    break
else:
    continue
print(x)

asked 16 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 18 تير 1395 ساعت: 1:55

صفحه بندی