This assignment contains three exercises to practice different types of loops in Python.
- Use a while loop to create a number guessing game
- Target number is 15
- Provide hints (too high/too low)
- See
README_GuessingGame.md
for details
- Use nested for loops to print a multiplication table
- Print table from 1 to n
- See
README_MultiplicationTable.md
for details
- Use loops to reverse a string (no slicing allowed)
- Build the reversed string character by character
- See
README_ReverseString.md
for details
-
Install dependencies:
pip install -r requirements.txt
-
Run tests:
python -m pytest tests/ -v
guessing_game.py
- Guessing game implementationmultiplication_table.py
- Multiplication table implementationreverse_string.py
- String reversal implementationtests/
- Test files for each exerciseREADME_*.md
- Detailed instructions for each exercise