Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastermind Algorithm Testing Assessment

Time Allocation: 1 hour 30 minutes

Objectives:

  • Test your understanding of unittesting concepts
  • Practice creating custom exceptions
  • Demonstrate algorithmic problem-solving skills
  • Implement proper error handling

Instructions:

Part 1: Understanding the Code Structure (10 minutes)

  1. Examine all provided files carefully
  2. Understand the existing code structure and requirements
  3. Identify where custom exceptions need to be implemented

Part 2: Implementing Custom Exceptions (20 minutes)

  1. Complete the custom exceptions in custom_exceptions.py
  2. Ensure exceptions are properly inherited from the Exception class
  3. Add appropriate error messages

Part 3: Core Algorithm Implementation (40 minutes)

  1. Implement the Mastermind game logic in assessment.py
  2. Follow the skeleton structure provided in the comments
  3. Ensure all functions raise appropriate custom exceptions
  4. Implement proper input validation

Part 4: Writing Unit Tests (20 minutes)

  1. Complete the test cases in test_assessment.py
  2. Cover all possible scenarios including edge cases
  3. Ensure tests validate both successful executions and exception cases

Requirements:

  • DO NOT modify the existing function signatures
  • You MUST use custom exceptions where specified
  • All tests in test_assessment.py must pass
  • Handle edge cases appropriately
  • Write clean, readable code with comments

Running the Tests:

# Run your tests
python test_assessment.py

# Run with verbose output
python test_assessment.py -v

# To get final results 
run bash .scripts/test_script.bash

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages