Skip to content

About

πŸŽ“ 42 School | Complete Rank 04 (milestone 4) preparation toolkit featuring an interactive PracticeShell simulator and level-based Python solutions.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ExamShell Banner


PracticeShell
πŸ‘‰ Get your 42 badges here

Rank 04 (Python) PracticeShell - Exercises & Solutions


Warning

At the request of the 42 Network, this repository no longer contains the real Rank 04 exam subjects or solutions. The PracticeShell now uses original exercises. They are great for training, but they are not the actual exam questions.


πŸ’‘ About

This repository is a growing bank of exercises for the topics learned during Milestone 4 of the Python Common Core.

The goal is to help you:

  • Train the topics you learned during the milestone
  • Review your doubts and find your weak points
  • Prepare for the exam by practicing under time and test pressure.

New exercises will be added over time. Each one focuses on a concept learned during this milestone.



PracticeShell Preview

Quick Start β€’ Features β€’ Performance β€’ Exam Mode β€’ Practice Mode β€’ Solutions


A Python-based PracticeShell simulator inspired by the new 42 School Common Core Rank 04 learning material, combined with a collection of organized solutions grouped by difficulty level.


πŸš€ Quick Start

Clone the repository:

git clone https://github.com/SaraFreitas-dev/42-Python-ExamShell-Rank04
cd 42-Python-ExamShell-Rank04

Run the PracticeShell:

python3 practiceshell.py

You will be presented with the main menu:

[1] Start Exam
[2] Practice Mode
[3] List all exercises
[q] Quit

No dependencies, no setup: just Python 3.


πŸ“ Workspace

When the PracticeShell starts, it automatically creates an exam_workspace directory.

All exercise files should be created inside this folder. The grader will only validate solutions placed in the generated workspace.

Example:

exam_workspace/
└── py_move_zeros_end.py

Simply create the requested file, implement your solution, and submit it through the PracticeShell interface for automatic evaluation.


⭐ Main Feature: PracticeShell Simulator

The PracticeShell is the core of this repository.

It lets you practice each milestone topic hands-on, with hidden tests and automatic feedback, instead of just reading solutions.

PracticeShell Preview

Grading Exam experience Interface
Automatic grading Random exercise assignment Colored terminal UI
Hidden test cases Progressive level system Score tracking
Performance tests with timeout Exam & practice modes Time tracking
Forbidden function rules Rank progression logic Pure Python

The workflow:

  1. Receive a subject
  2. Create the requested Python file
  3. Implement the solution
  4. Submit for grading
  5. Fix failing tests
  6. Progress to the next level

PracticeShell KO example


⏱️ Performance Tests

Many exercises require solutions that are not only correct, but also efficient.

Some exercises include large hidden inputs. If your solution takes too long, the test is marked as [TIMEOUT], even if the result would eventually be correct:

✘ KO  count_pairs_sum([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15...
        expected: 5000
        got     : '[TIMEOUT]'

πŸ’‘ If you get a timeout, review the complexity of your approach rather than the correctness of the output.


🎯 Exam Mode

Select:

[1] Start Exam

The simulator will:

  • Assign exercises automatically
  • Increase difficulty after each successful exercise
  • Track your score
  • Simulate a 3-hour exam session

πŸ† Passing the Exam

The simulator uses a progressive difficulty system. To successfully complete the exam you must validate:

4 / 4 exercises

πŸ›  Practice Mode

Select:

[2] Practice Mode

Practice Mode allows you to:

  • Choose any exercise
  • Focus on a specific level
  • Submit unlimited times
  • Train without time pressure

πŸ“š Solutions

Solutions are organized by level and include the completed exercises.

solutions/
β”œβ”€β”€ level_1
β”œβ”€β”€ level_2
β”œβ”€β”€ level_3
└── level_4

This makes it easy to study specific difficulty ranges or review previously solved exercises.

⚠️ Try each exercise in the PracticeShell first. Reading solutions before attempting them will not show you where your weak points are.


πŸ“– Topics Covered

  • Lists and nested lists
  • Two-pointer techniques
  • Sorted sequences and intervals
  • Algorithmic efficiency and time complexity
  • Implementing algorithms without forbidden built-ins (sorted(), .sort(), heapq)
  • Edge case handling
  • Algorithmic thinking

⚠️ Disclaimer

This project is an independent educational tool. It is not affiliated with or endorsed by 42 School, and it does not contain any official 42 exam content.


πŸ’‘ Suggestions

Found a bug, a missing test case or have an idea? Feel free to open an issue.


⭐ Support

If this repository helped you prepare for the exam, consider giving it a star ⭐

Good luck and happy coding πŸš€

About

πŸŽ“ 42 School | Complete Rank 04 (milestone 4) preparation toolkit featuring an interactive PracticeShell simulator and level-based Python solutions.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages