---
# System prepended metadata

title: 判斷7的倍數

---

#  判斷7的倍數
```=python
while True:
    number = input("Please enter a number:")
    if number.isdigit() != True:
        print("This is not a number")
        continue
    num = int(number)
    if 0 > num or num > 1000:
        print("This number is too big or too small")
        continue
    if num % 7 == 0:
        print('This number is divisible by seven')
        break
    else:
        print('This number is not divisible by seven')
        break
```
![](https://i.imgur.com/SsvTfuP.png)


