From Zero to Python: A Step-by-Step Guide to Your First Project Setup


So, you’re ready to dive into a new Python project, but where do you start? This guide breaks down the initial setup process, mirroring the steps often taken by developers to get a project like “ResizerMate” off the ground. We’ll cover creating a home for your code on GitHub, getting it onto your local machine, writing your first lines of Python in VS Code, and saving your progress with Git.

Let’s get started!

Step 1: Create Your Project’s Home on GitHub [Video Timestamp: 00:04]

Every good project needs a central hub. GitHub is a popular platform for hosting and collaborating on code. The first step in the video is to create a new “repository” (often called a “repo”) on GitHub.

  • What’s happening? A new repository named “ResizerMate” is created. It’s set to “private,” meaning only the creator (or those they grant access to) can see it.
  • Why is this important? This gives your project a remote backup and a place for version history. If you plan to collaborate, it’s essential.
  • Learn More:

Step 2: Bring Your Project to Your Computer (Cloning) [Video Timestamp: 00:46]

Once the repository exists on GitHub (the “remote” location), you need a copy on your own computer (the “local” location) to actually work on the code. This is done by “cloning” the repository.

  • What’s happening? The video shows using Windows PowerShell (a command-line tool) with the git clone command to download the “ResizerMate” repository from GitHub to the local machine.
  • Why is this important? This creates a local working copy of your project that’s linked to the remote GitHub repository, allowing you to synchronize changes.
  • Learn More:

Step 3: Open in VS Code & Create Your First Python File [Video Timestamp: 01:51]

With the project on your local machine, it’s time to open it in a code editor. Visual Studio Code (VS Code) is a popular choice for Python development.

  • What’s happening? The “ResizerMate” project folder is opened in VS Code. Then, a new file named script.py is created. The .py extension tells VS Code (and Python) that this is a Python file.
  • Why is this important? VS Code provides tools like syntax highlighting, debugging, and terminal integration that make coding easier. Creating a .py file is where your Python code will live.
  • Learn More:

Step 4: Write Your First Python Script (“Hello, World!”) [Video Timestamp: 02:13]

It’s a tradition in programming to start with a simple “Hello, World!” program to ensure everything is set up correctly.

  • What’s happening? The video shows the following Python code being typed into script.py:
if __name__ == "__main__": 
    print("hello world")
  • Why is this important? This basic script, when run, will print “hello world” to the screen. The if __name__ == "__main__": part is a common Python idiom that ensures the print statement runs when the script is executed directly.
  • Learn More about Python basics: If you’re new to Python, the official Python tutorial is a great place to start: The Python Tutorial

Step 5: Run Your Python Script [Video Timestamp: 02:43]

After writing the code, the next step is to run it and see the output.

  • What’s happening? The script is run in the terminal (the integrated terminal within VS Code).
  • Why is this important? This confirms that your Python installation is working and your script does what you expect.
  • Learn More (running Python in VS Code is covered in the VS Code Python tutorial linked in Step 3).

Step 6: Save Your Work with Git & Push to GitHub [Video Timestamps: 02:49 – 03:35]

Now that you’ve made changes (created a new file and added code), you need to save this progress to your version control system (Git) and then send these changes back to your GitHub repository. This is a multi-step process:

  1. Add files to staging (git add): You tell Git which changes you want to include in your next save point (commit).
  2. Commit changes (git commit): You create a snapshot of your changes with a descriptive message. This snapshot is saved in your local Git repository.
  3. Push changes (git push): You upload your local commits to the remote repository on GitHub.
  • What’s happening? The video shows the script.py file being added to Git, then a “commit” is made with a message describing the changes. Finally, these committed changes are “pushed” to the GitHub repository. The video concludes by verifying on GitHub.com that the file and its content have appeared in the remote “ResizerMate” repository.
  • Why is this important?
    • git add prepares your changes.
    • git commit creates a record of your work locally, allowing you to revert to this point if needed.
    • git push updates the remote repository on GitHub, backing up your work and making it available to collaborators (if any).
  • Learn More:

And that’s it! You’ve successfully initiated a Python project, from creating its online presence on GitHub to writing and saving your first lines of code. These fundamental steps are the bedrock of most software development workflows. Happy coding!