help ty

the question was" how many times does the while run for " my answer was that it runs one times because it says h = count converted to boolean which is one so its true so it starts running at the end it says h=!h so it becomes false and stops , the prof said it was wrong but im not sure why ? and hes very bad when being told hes wrong so if anyone can help me understand bc im confused it would be appreciated
Screenshot_2025-03-05_151733.png
Was this page helpful?