The problem is that in each iteration you are not printing anything. You are just assigning values to r
. If you want to print a random integer in each iteration, then the print()
call should be inside the for
loop:
for k in range(6):
r = random.randint(1, 75)
print("Winning Lotto Numbers: ", r)
Notes:
You can reduce your code by printing the number directly (without assigning it to a variable):
for k in range(6): print("Winning Lotto Numbers: ", random.randint(1, 75))
Edit:
To display "Winning Lotto Numbers: " only once, you can do:
print("Winning Lotto Numbers: ")
for k in range(6):
print(random.randint(1, 75), end = ' ')