Skip to content

Computer-Society-WSU/SystemOfEquations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation


Systems of Equations in Python: A Beginner’s Guide ENGR 107 - SWE Workshop

Welcome to the Systems of Equations Workshop! In this workshop, we’ll learn how Python can solve systems of equations — and yes, even calculate how many kombuchas and cappuccinos you ordered. (Because who doesn’t need to know the precise extent of their caffeine addiction?)


What’s Happening?

  • Setting up the equations: We write our equations as a matrix to keep things tidy.
  • Python in action: Python crunches the numbers and tells us exactly how many kombuchas and cappuccinos were ordered.
  • The big reveal: We now know exactly how bad our caffeine addiction is.

Setting Up Your Environment

Before we dive into coding, let's make sure you have everything you need.

1. Downloading Python

Python is the language we’re using, and here’s how you get it installed on your system:

For Windows:

  • Step 1: Go to python.org/downloads.
  • Step 2: Download the latest Windows installer.
  • Step 3: Run the installer and check the box that says "Add Python to PATH".
  • Step 4: Follow the installation steps.

For Mac:

  • Step 1: Visit python.org/downloads.
  • Step 2: Download the latest macOS installer.
  • Step 3: Open the downloaded package and follow the prompts.
  • Step 4: Alternatively, you can install Python via Homebrew (see below).

For Linux:

  • Step 1: Most Linux distributions come with Python pre-installed. Check by opening a terminal and typing:
    python3 --version
    
  • Step 2: If it’s not installed, use your package manager. For example, on Ubuntu/Debian:
    sudo apt-get update
    sudo apt-get install python3
  • Step 3: For Fedora:
    sudo dnf install python3

2. Installing Homebrew (Mac Only) // IF HOMEBREW NOT INSTALLED

Homebrew is a package manager for macOS that makes installing software (like Python) a breeze. If you’d prefer to use Homebrew to install Python or other tools, follow these steps:

  • Step 1: Open the Terminal application.
  • Step 2: Paste the following command and press Enter:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Step 3: Follow the on-screen instructions to complete the installation.
  • Step 4: Once Homebrew is installed, you can install Python by typing:
    brew install python

3. Choosing an IDE or Text Editor

An Integrated Development Environment (IDE) or text editor makes coding easier. Here are some options:

  • Visual Studio Code (VS Code):

    • Free and beginner-friendly.
    • Download from code.visualstudio.com.
    • Great for Python with the official Python extension.
  • PyCharm:

  • Thonny:

    • Designed specifically for beginners.
    • Download from thonny.org.
  • Vim:

    • A powerful text editor if you’re feeling adventurous.
    • Quick Vim Tutorial:
      • Open a file: In your terminal, type:
        vim your_script.py
      • Insert mode: Press i to start editing.
      • Save and exit: Press Esc, type :wq, then hit Enter.
      • For help: Inside Vim, type :help for more commands.
    • Note: Vim has a steep learning curve, but it’s useful once you get the hang of it!

4. Running Your Python Code

Once you’ve written your code (whether in VS Code, PyCharm, Thonny, or Vim), you can run it from your terminal or command prompt.

  • Open your terminal/command prompt.
  • Navigate to your script’s directory:
    cd path/to/your/script
  • Run the script:
    python your_script.py
    or on some systems:
    python3 your_script.py

Additional Resources


Final Thoughts

This guide is designed to get you started on your Python journey in a fun, friendly way. Don’t worry if you’re new to programming – everyone starts somewhere. Grab your favorite IDE (or even Vim if you’re feeling bold), install Python (and Homebrew if you’re on a Mac), and dive into the code. Let’s discover the magic of solving systems of equations together!

Happy coding, and may your kombucha and cappuccino calculations always be precise!


---
# SystemOfEquations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages