Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- for num in range(1, n +1):
- is_true = False
- sum_of_num = sum([int(el) for el in str(num)])
- if sum_of_num == 5 or sum_of_num == 7 or sum_of_num == 11:
- is_true = True
- print(f"{num} -> {is_true}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement