Skip to content

nihalafs11/python-looping-practice

Repository files navigation

Python Loops Warmup Assignment

This assignment contains three exercises to practice different types of loops in Python.

Exercises

1. Guessing Game (guessing_game.py)

  • 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

2. Multiplication Table (multiplication_table.py)

  • Use nested for loops to print a multiplication table
  • Print table from 1 to n
  • See README_MultiplicationTable.md for details

3. Reverse String (reverse_string.py)

  • Use loops to reverse a string (no slicing allowed)
  • Build the reversed string character by character
  • See README_ReverseString.md for details

Setup

  1. Install dependencies:

    pip install -r requirements.txt
  2. Run tests:

    python -m pytest tests/ -v

Files

  • guessing_game.py - Guessing game implementation
  • multiplication_table.py - Multiplication table implementation
  • reverse_string.py - String reversal implementation
  • tests/ - Test files for each exercise
  • README_*.md - Detailed instructions for each exercise

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages