# AI-For-Beginners Exercises and Assignments: A Complete Guide to Hands-On Labs

> Explore hands-on AI-For-Beginners exercises and assignments in executable Jupyter Notebook labs. Reinforce AI concepts with practical implementation from the Microsoft repository. Get started today!

- Repository: [Microsoft/AI-For-Beginners](https://github.com/microsoft/AI-For-Beginners)
- Tags: how-to-guide
- Published: 2026-08-11

---

**Yes, the microsoft/AI-For-Beginners repository includes comprehensive exercises and assignments structured as executable Jupyter Notebook labs designed to reinforce theoretical concepts with practical implementation.**

The **microsoft/AI-For-Beginners** curriculum is built around active learning, combining pre-reading material with hands-on coding exercises. Each lesson provides structured **assignments** that challenge learners to apply AI concepts to real-world problems using Python and popular machine learning frameworks.

## How Exercises Are Structured in AI-For-Beginners

According to the repository's documentation in [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) (lines 120-124), the curriculum follows a three-part pedagogical approach. Every lesson provides pre-reading material, executable Jupyter notebooks for guided learning, and optional **labs** that function as practical exercises for students to demonstrate competency.

The [`lessons/0-course-setup/setup.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/0-course-setup/setup.md) file (lines 16-24) explicitly outlines the self-study workflow, instructing learners to fork the repository and "complete the assignment" after working through the provided notebooks. This establishes a clear progression from theory to practice.

### Lab Directory Organization

Exercises are consistently located within lesson directories following the pattern `lessons/X-Topic/YY-LessonName/lab/`. Each lab folder contains a [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) describing the specific task, success criteria, and any starter code requirements.

## Example Lab: Detecting Movements using Optical Flow

A representative example of the **AI-For-Beginners exercises** can be found in the Computer Vision section. The lesson at `lessons/4-ComputerVision/06-IntroCV/` includes a lab titled *Detecting Movements using Optical Flow*, documented in [`lessons/4-ComputerVision/06-IntroCV/lab/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/06-IntroCV/lab/README.md) (lines 1-11).

This assignment requires students to implement video frame processing using OpenCV. The starter notebook `MovementDetection.ipynb` provides the scaffold code, while the lab instructions specify the objective: analyze video streams to detect motion patterns.

The exercise utilizes standard OpenCV video capture patterns as shown in the reference implementation from [`lessons/4-ComputerVision/06-IntroCV/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/4-ComputerVision/06-IntroCV/README.md) (lines 46-47):

```python
import cv2

# Open a video file (replace with your own path)

cap = cv2.VideoCapture('palm-movement.mp4')

while cap.isOpened():
    ret, frame = cap.read()
    if not ret:
        break          # End of video

    # Display the current frame

    cv2.imshow('Video Frame', frame)

    # Press 'q' to quit early

    if cv2.waitKey(30) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

```

Students modify and extend this base implementation to complete the optical flow detection requirements specified in the lab documentation.

## Summary

- The **microsoft/AI-For-Beginners** repository includes structured **exercises and assignments** in the form of hands-on labs.
- Labs are located in `lab/` subdirectories within individual lesson folders and documented in [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) files.
- The curriculum explicitly instructs learners to "complete the assignment" as part of the self-study workflow defined in [`lessons/0-course-setup/setup.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/0-course-setup/setup.md).
- Assignments typically involve extending provided Jupyter notebooks, such as `MovementDetection.ipynb` in the Computer Vision module.
- Not all lessons contain labs; availability varies by topic complexity and practical applicability.

## Frequently Asked Questions

### Are all lessons in AI-For-Beginners required to have labs?

No, labs are available for select topics where hands-on implementation provides significant educational value. The main [`README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/README.md) specifies that labs are provided for "some topics" rather than every lesson, allowing the curriculum to focus practical exercises on concepts that benefit most from experiential learning.

### How do I submit completed assignments in AI-For-Beginners?

The repository uses a fork-based workflow for self-study. According to [`lessons/0-course-setup/setup.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/0-course-setup/setup.md) (lines 16-24), students should fork the repository, complete the notebooks locally, and push changes to their personal fork. There is no centralized submission system; the workflow emphasizes personal portfolio building and self-assessment.

### What programming languages are used in the exercises?

All **AI-For-Beginners exercises** use **Python** as the primary language, leveraging libraries such as OpenCV, TensorFlow, PyTorch, and scikit-learn. The labs are delivered as Jupyter notebooks (`.ipynb` files) that combine executable code with explanatory markdown.

### Do I need GPU hardware to complete the lab assignments?

Most introductory labs, including the Computer Vision optical flow exercise, are designed to run on standard CPU hardware. However, specific lessons involving deep learning training may benefit from GPU acceleration. The individual lab instructions in each [`lab/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lab/README.md) specify any hardware requirements or provide cloud-based alternatives.