Skip to Content
Support Palestine 🍉  ⬩  In News

Lab 0: Python Warm-up and Submission Guidelines

Target:

geca-labs/lab-daa

OR
Continue with your 👇 existing repo

In this lab, you will get familiar with Python programming basics and the lab submission process.

  • Language: Python (preferred for readability and interview relevance)
  • Environment: GitHub Codespaces (for a consistent development environment)
  • Repository: GECA Labs Repository

Files

  • a.py to z.py with three bonus z+.py, z++.py, and z+++.py files.
  • Each file will have a task to complete, and you will learn how to commit and push your changes to GitHub.
  • .spoiler folder for additional hints and solutions. Do not copy-paste from there; instead, understand the logic and implement it in your own way.

Walkthrough

After clicking the link above, follow these steps:

GitHub Codespaces New Instance

Screenshot of GitHub Codespaces New Instance

  • Ensure default settings are selected. Change only if you know what you’re doing.
  • Click Create codespace.
  • Wait for the codespace to initialize. This may take a few minutes.

Screenshot of VS Code Interface

⚠️

Warning:
It can cost you some GitHub credits. Thus, don’t forget to delete/stop the codespace after you’re done. If you want to keep it for a while, make sure to stop it, and you can access it later from your GitHub profile under “Codespaces”. github.com/codespaces

VS Code Interface

Screenshot of VS Code Interface

  • Familiarize yourself with the VS Code interface.
  • Terminal: Use the terminal at the bottom for running commands.
  • File Explorer: Use the file explorer on the left to navigate files.
  • Source Control: Use the source control icon to manage your code changes.
  • Status Bar: Check the status bar at the bottom for managing your codespace, changing branches, and more.

These are few, but more significant w.r.t. our course. You can explore more features of VS Code as you go along.

Complete first file a.py

Screenshot of a.py file

  • Open the file a.py in the editor.
  • Follow the task and tip in comments to complete the file.
  • Use the terminal to run the file with the following command:
python3 a.py

Since this is in Linux, we’ve used python3 to run the file. If you’re using Windows, you might need to use python instead.

Commit Changes

Screenshot of Commit Changes

  • After completing the task, go to the source control icon in the sidebar.
  • You will see the changes you made in a.py.
  • Enter a commit message as given in the screenshot.
  • Click the checkmark icon to commit your changes.
💡

There is a term called stage in Git, which means you are selecting the changes you want to include in your next commit. You can stage changes by clicking the plus icon next to the changed files in the source control panel.

Push/Publish Changes

Screenshot of Push Changes

  • After committing, you need to push your changes to the remote repository.
  • Remember, this repository is of your fork, not the original one.

Create Pull Request

Screenshot of Create Pull Request

  • After pushing your changes, there will be a notification in the bottom right corner.
  • Click on Create Pull Request.

Note: If you don’t see the notification, you can also go to the source control icon and click on Create Pull Request next to changes section.

Fill Pull Request Details

Screenshot of Fill Pull Request Details

  • Fill in the title and description for your pull request as per the format given below.
FieldValue
TitleSubmission of Lab 0 by [YOUR_PRN]
(e.g., Submission of Lab 0 by BT24F05F001)
DescriptionBriefly describe what you did in this lab. What challenges did you face? How did you overcome them?

Preview of Pull Request

⚠️

Warning:
If you don’t provide a proper title and description, your pull request may be rejected. Or you may be asked to modify it later. If you fail to do so, you may not receive marks for the lab.

Complete the remaining labs

Screenshot of Complete Remaining Labs

  • After creating the pull request, you can continue working on the remaining labs.
  • All the changes upon committing and pushing will automatically reflect in the same pull request.
  • You have to press Sync Changes to keep your pull request up to date.

Screenshot of Sync Changes

  • It’s like a live document where you can keep adding your work.
  • So, you can complete some remaining labs even after session, and your pull request will still be valid.

Stop or Delete Codespace

Screenshot of Stop Codespace

  • After completing all labs, you can stop your codespace to save resources and GitHub credits.
  • It’ll take a few minutes to stop, and you can access it later from your GitHub profile under “Codespaces”. github.com/codespaces

Screenshot of Codespace Stopped

  • If you want to delete your codespace permanently, you can do so from your GitHub profile under “Codespaces”. github.com/codespaces

Screenshot of Codespace Deleted

Done! 🎉

References

  1. Python Official Documentation. (n.d.). Retrieved from https://docs.python.org/3/
  2. GitHub Codespaces Documentation. (n.d.). Retrieved from https://docs.github.com/en/codespaces
  3. CS50x Week 3: Algorithms. (2025). Harvard University. Retrieved from https://cs50.harvard.edu/x/2025/weeks/3/
  1. CS50’s Introduction to Programming with Python. (2022). Harvard University. Retrieved from https://cs50.harvard.edu/python/2022/
  1. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C.
    Introduction to Algorithms, 3rd/4th Edition, MIT Press.


💡

Some of my latest posts on LinkedIn

Last updated on