Final answer:
To generate five random lottery numbers of a three-digit number between 100 and 999 using a single loop in Python, you can use the random() function.
Step-by-step explanation:
To generate five random lottery numbers of a three-digit number between 100 and 999, you can use a single loop and the random() function in a programming language like Python. Here's an example code:
import random
i = 0
while i < 5:
num = random.randint(1, 9)
lottery_number = str(num) + str(num) + str(num)
print(f'Lottery number{i+1}: {lottery_number}')
i += 1
This code uses the random.randint() function to generate a random number between 1 and 9 (inclusive), and then concatenates the same digit three times to create the three-digit number. It repeats this process five times using a loop and prints the lottery numbers.