Required assignment path: Start Here → Analyze → Design → Submit
Optional SDLC practice: Construct → Test
The Construct phase turns a design into working code.
For Module Four, construction is optional practice. Your grade is based on design/hilow_game.pseudo, not on hilow_game.py.
Complete this phase only after your graded pseudocode is finished. The goal is to practice using your own design as the plan for a Python program.
This phase produces no graded or submitted Module Four deliverable.
If you choose the practice, edit:
Do not submit this file unless your instructor specifically requests it.
Use:
- your completed
../design/hilow_game.pseudo; - the provided starter
hilow_game.py; - the Higher/Lower Game Sample Output;
- the SRS; and
- relevant zyBooks material.
Useful Module Four sections include:
- 4.1 Loops (general)
- 4.2 While loops
- 4.3 More while examples
- 4.7 While vs. for loops
- 4.9 Developing programs incrementally
Earlier material on input/output, type conversion, decision branching, relational operators, Boolean expressions, and indentation also applies.
Do not use coding as a substitute for the graded pseudocode.
Before editing hilow_game.py, make sure your pseudocode represents:
- bound input and validation;
- random-number generation;
- guess input and validation;
- the three valid-guess outcomes; and
- repetition until the correct guess.
Open your completed pseudocode beside hilow_game.py.
Translate one design step at a time. The goal is:
Pseudocode step → matching Python behavior
If coding reveals that the design is incomplete or inconsistent, revise the pseudocode first, then update the code.
The starter provides organizational scaffolding, including:
from random import randintdef main() -> None:- the
main()docstring - the
if __name__ == "__main__":main guard
Leave that scaffolding in place and replace the TODO comments with your own code.
The main() function and main guard organize the starter file. Functions are taught later in the course; you do not need to master them to complete this optional practice.
The starter imports randint for the random-number requirement.
Use your pseudocode to decide when the random number should be generated and which values should be passed to the provided operation.
Translate repeated design behavior into loops rather than copying the same statements many times.
For each loop, keep the same questions you used during Design:
- What condition controls repetition?
- What changes during the loop?
- What lets the loop stop?
Do not wait until the entire optional program is complete before running it.
A useful cycle is:
- make one small change;
- save the file;
- run the program;
- correct any syntax or runtime error; and
- continue only after the program runs again.
From the repository root, use the same Bash commands on the CVD, Linux, macOS, and Windows Git Bash:
cd ~/Repos/it140-m4-assignment
python3 src/hilow_game.pyReplace the TODOs in the module docstring so it briefly describes:
- the optional program's purpose;
- major inputs;
- major processing; and
- major output categories.
Keep the description about this Higher/Lower Game, not another assignment.
If you used outside sources, examples, people, IDE-generated suggestions, or generative AI assistance while completing the optional practice, acknowledge the assistance according to current SNHU and assignment guidance.
If you did not use an outside source, delete the unused reference TODO line.
Before moving to optional testing:
- My graded pseudocode was complete before I began optional coding.
- I changed only TODO areas in the starter.
- My module docstring describes the Higher/Lower Game.
- My code follows my own pseudocode.
- I left the starter import,
main()definition, and main guard in place. - I used loops for repeated behavior.
- Each loop has a path toward its stopping condition.
- I ran after small changes and corrected errors incrementally.
- I acknowledged outside help I actually used or deleted the unused reference TODO.
- No TODO lines remain in my completed optional file.
- The program runs without a Python error for a normal input sequence.
If you have difficulty:
- Start with your completed pseudocode and translate one step at a time.
- Return to Design if the design is incomplete.
- Review the Higher/Lower Game Sample Output for expected behavior.
- See the Module Four Assignment Wiki for supplemental guidance.
- Use GitHub Discussions for questions about optional practice tools.
- Use GitHub Issues to report technical problems with the provided starter.
- Contact your instructor through D2L Brightspace for assignment requirements or grading questions.
Continue to Test for optional practice, or return to Submit Your Assignment.

