Skip to content

About

Previous year OPPE solutions for Python (CS1002/CS2102): IIT Madras BS Degree Programme

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

Repository files navigation

Python OPPE Solutions

Previous year OPPE solutions for Python (CS1002/CS2102) - IIT-Madras BS Degree Programme

Step-by-step solutions, multiple approaches, and downloadable slides for Python OPPE previous year questions.

🌐 Live site: nirban-a.github.io/python-oppe-solutions


Local development

pip install mkdocs-material
mkdocs serve          # live-preview at http://127.0.0.1:8000

Deploy to GitHub Pages

Push to main - the GitHub Actions workflow in .github/workflows/deploy.yml runs mkdocs gh-deploy automatically.

Or deploy manually:

mkdocs gh-deploy

Adding a new problem

  1. Create docs/oppe1/YYYY/mmm/setN/YYYY_mmm_N_sXqY.md using the template below.
  2. Add the page to nav: in mkdocs.yml.
  3. Update the parent index.md badge from pb-badge-soon to pb-badge-done.
  4. Update docs/status.md summary table.

File naming convention

YYYY_mmm_N_sXqY.md

YYYY  → year         e.g. 2025
mmm   → month        e.g. jan, may, sep
N     → set number   e.g. 1, 2, 3
sX    → section      e.g. s1, s2, s3
qY    → question     e.g. q1, q2

Example: 2025_jan_3_s2q1.md

nav entry format (in mkdocs.yml)

- S2Q1 · Problem Title: oppe1/2025/may/set3/2025_may_3_s2q1.md

Page template

# SXQ Y · Problem Title

<div class="pb-downloads">
  <a class="pb-btn pb-btn-repo" href="https://github.com/Nirban-A/python-oppe-solutions/tree/main/FOLDER" target="_blank">
    📁 GitHub
  </a>
</div>

???+ abstract "⚡ Quick Reference"
    **Function:** `function_name(args) -> return_type`

    **Core idea:** one sentence.

    ```python
    # minimal solution here
    ```

    **Key rules:**
    - rule 1
    - rule 2

---

## Problem Statement

!!! note "Problem"
    Problem description here.

**Examples:**

<div class="pb-io">
<div class="pb-io-block input">
<span class="pb-io-label">Input</span>
<pre><code>example input</code></pre>
</div>
<div class="pb-io-block output">
<span class="pb-io-label">Output</span>
<pre><code>example output</code></pre>
</div>
</div>

---

## Understanding the problem

Explanation, tracing table, insight blocks.

!!! insight "Insight title"
    Explanation of the key insight.

---

## Solution approaches

=== "Explanatory"

    ```python
    # verbose, beginner-friendly solution with comments
    ```

    Description of approach.

=== "Pythonic"

    ```python
    # clean, idiomatic one-liner or comprehension
    ```

    Description.

=== "Using lambda"
    ```python
    # functional approach using lambda/map/filter
    ```

    Description.

---

## Key takeaways

<div class="pb-cards">
<div class="pb-card">
<div class="pb-card-num">01</div>
<h4>Concept title</h4>
<p>Explanation with <code>inline code</code>.</p>
</div>

<div class="pb-card">
<div class="pb-card-num">02</div>
<h4>Concept title</h4>
<p>Explanation.</p>
</div>

<div class="pb-card">
<div class="pb-card-num">03</div>
<h4>Concept title</h4>
<p>Explanation.</p>
</div>

</div>

Notes:

  • Always include 3 key takeaway cards
  • Solution tabs: use at least Explanatory + Pythonic; add lambda tab where applicable
  • !!! insight "title" for important insights inside section bodies
  • !!! note "Problem" for the problem statement block
  • !!! warning "title" if there are known errors in the original template/docstring

Project structure

python-oppe-solutions/
├── mkdocs.yml
├── README.md
├── .github/
│   └── workflows/
│       └── deploy.yml
└── docs/
    ├── index.md
    ├── status.md
    ├── feedback.md
    ├── stylesheets/
    │   └── extra.css
    ├── javascripts/
    │   └── extra.js
    └── oppe1/
        ├── index.md
        └── <year>/             # e.g., 2024, 2025, 2026
            ├── index.md
            └── <term>/        # e.g., jan, may, sep
                ├── index.md
                ├── set1/    
                ├── set2/    
                └── set3/  


Completed sets

Exam Session Set
OPPE 1 2026 Jan 4 Sets
OPPE 1 2025 Jan 3 Sets
OPPE 1 2025 May 5 Sets
OPPE 1 2024 Sep 3 Sets
OPPE 2 2024 Sep 3 Sets
OPPE 2 2025 Jan 3 Sets
OPPE 2 2025 May 3 Sets

About

Previous year OPPE solutions for Python (CS1002/CS2102): IIT Madras BS Degree Programme

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors