This project simulates a CodeSignal Industry Coding Framework assessment. It contains four progressive coding levels that build on each other, similar to a real industry OA environment.
industry_coding_practice/
│
├── level1_basic.py
├── level2_processing.py
├── level3_refactor.py
├── level4_extend.py
│
├── test_level1.py
├── test_level2.py
├── test_level3.py
├── test_level4.py
│
└── README.md
Each level has:
- A starter implementation file (
levelX_*.py) with function headers, docstrings, and# TODOmarkers. - A corresponding test file (
test_levelX.py) that you can run directly with Python.
-
Implement the TODOs for the current level.
-
Run tests for that level using:
python test_level1.py
-
Move to the next level and repeat the process.
Focus: General programming skills, basic data structures, and error handling.
You must implement:
FILE_UPLOAD(file_name, size)
Upload file to the server. RaiseRuntimeErrorif file exists.FILE_GET(file_name)
Return size if exists, elseNone.FILE_COPY(source, dest)
Copy a file. Raise error if source missing. Overwrite destination if exists.
Skills Tested:
- Control flow
- Dictionaries/lists
- Error handling
Focus: Data manipulation, searching, and sorting.
New method:
FILE_SEARCH(prefix)
Return up to 10 files starting withprefix. Sort by:- Size (descending)
- File name (ascending)
Skills Tested:
- Sorting by multiple criteria
- Filtering data
- Building on existing methods
Focus: Time-dependent data, encapsulation, and TTL handling.
New methods:
FILE_UPLOAD_AT(timestamp, file_name, file_size, ttl=None)
Upload a file with an optional time-to-live (seconds). If a file is created with timestamp 10 and ttl 5, at timestamp 15 it is expired.FILE_GET_AT(timestamp, file_name)
Return file size only if file is still alive attimestamp.FILE_COPY_AT(timestamp, source, dest)
Copy a file only if it exists and is alive.FILE_SEARCH_AT(timestamp, prefix)
Search only for alive files.
Skills Tested:
- Time-based logic
- Conditional filtering
- Code reuse and refactoring
Focus: System rollback and code scalability.
New method:
ROLLBACK(timestamp)
Restore the system to its state at the given timestamp.
Skills Tested:
- State reconstruction
- System design thinking
- Maintaining backward compatibility
- Work level by level — don’t skip ahead.
- Aim for clean, reusable code at each step.
- You can print your outputs while debugging; final tests should pass silently.
Good luck and have fun practicing!