While Loop

import random
count = 0
while count < 3:
  num = random.randint(1, 6)
  print (num)  
  count += 1

sometimes it print result grater than 3 but the condition is juts count < 3, why?

you are not printing the variable used in the condition.

Ohh! I am new to programming and I got lots of error but sir You have been so much helpful to me thank a lot sir. Today is Nepali new year and Happy Nepali new year Sir all the way from NEPAL.