<jupyter_start><jupyter_text>Make a small generator program for returning armstrong numbers in between 1-1000 in a generator object.<jupyter_code>lower = int(input("Enter lower range: "))
upper = int(input("Enter upper range: "))

for num in range(lower, upper + 1):

   order = len(str(num))

   sum = 0

   temp = num
   while temp > 0:
       digit = temp % 10
       sum += digit ** order
       temp //= 10

   if num == sum:
       print(num)<jupyter_output>Enter lower range: 1
Enter upper range: 1000
1
2
3
4
5
6
7
8
9
153
370
371
407
{'fraction_non_alphanumeric': 0.1033210332103321, 'fraction_numerical': 0.07011070110701106, 'mean_word_length': 2.9635036496350367, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '175992', 'license': 'Apache-2.0', 'n_tokens_mistral': 214, 'n_tokens_neox': 184, 'n_words': 70, 'path': 'DAY 9 ASSIGNMENT.ipynb', 'repo_name': 'gkumarashish213/letsupdrade', 'size': '542'}