<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># guessNumberWithWhile.py
""" Lecture example to demonstrate while-loop
"""

import random

min_num= 1
max_mum= 10
max_chances= 5
secret_num= random.randint(min_num, max_mum)
print("I have a number from "+str(min_num)+" to "+str(max_mum))
print("You have "+str(max_chances)+" chances to guess it")

# User guesses until all chances used up or guessed correctly
</pre></body></html>