6. Number Hunt activity: Halt execution while the user thinks of a random number.

Опубликовано: 25 Март 2026
на канале: WIBYTE
48
2

In this video, we look at how we can move to the second part of the project where the player gets to choose number while the computer guesses. We se how an empty input statement causes the execution to halt for the user to click enter, thus giving time to the user to think of a number.

For more details, including detailed notes, please see https://wibyte.in/python-class-course...

Other videos in the playlist -
1. Introduction and Learning Objectives -    • 1. Number Hunt activity: Introduction and ...  
2. Getting started, Boolean variables -    • 2. Number Hunt activity: Getting started, ...  
3. Setting up the while loop -    • 3. Number Hunt activity: Setting up the wh...  
4. Processing the user’s guessed numbers using if statements -    • 4. Number Hunt activity: Processing the us...  
5. Mistakes that can lead to infinite loops! -    • 5. Number Hunt activity: Mistakes that can...  
6. Halt execution while the user thinks of a random number. -    • 6. Number Hunt activity: Halt execution wh...  
7. Setting up the second while loop — User Chooses, computer guesses -    • 7. Number Hunt activity: Setting up the se...  
8. Linear Search with step size of 1, a correct but inefficient algorithm -    • 8. Number Hunt activity: Linear Search wit...  
9. Increasing the step size — oops! An infinite loop 😦-    • 9. Number Hunt activity: Increasing the st...  
10. Reducing the step size once the chosen number is crossed -    • 10. Number Hunt activity: Reducing step si...  
11. Motivation and intuitive explanation for the binary search algorithm -    • 11. Number Hunt activity: Motivation and i...  
12. Implementing Binary Search in Python -    • 12. Number Hunt activity: Implementing Bin...