diff options
18 files changed, 170 insertions, 94 deletions
diff --git a/tutorials/1_01_intro_to_programming.md b/tutorials/1_01_intro_to_programming.md new file mode 100644 index 0000000..8cebd0e --- /dev/null +++ b/tutorials/1_01_intro_to_programming.md @@ -0,0 +1,15 @@ +# Introduction to Programming +## The Importance of Programming in Engineering + +Engineering is all about solving problems, designing innovative solutions, and making systems work efficiently. Whether you’re designing cars, airplanes, rockets, or even everyday machines, programming plays a critical role in modern engineering. + +In mechanical engineering, programming helps us **analyze data, model complex systems, automate repetitive tasks, and simulate real-world physics.** For example, instead of spending hours solving equations by hand, engineers can write a program that does it in seconds. This saves time and therefore do more. + +With programming, mechanical engineers can: + +- **Automate calculations:** Quickly solve equations for heat transfer, fluid dynamics, and mechanical stresses. +- **Simulate systems:** Model how a bridge bends under weight or how an engine burns fuel efficiently. +- **Analyze data:** Process thousands of test results to improve designs. +- **Control machines:** Program robots, 3D printers, and CNC's. + +Today, learning to program is just as important as learning how to use a wrench or a CAD (Computer-Aided Design) tool. In this course, you’ll see how computing and programming apply to mechanical engineering and how they can make you a better problem solver. By the end, you’ll have the skills to write simple programs that help you **think like an engineer in the digital age.**
\ No newline at end of file diff --git a/tutorials/installing_anaconda.md b/tutorials/1_02_installing_anaconda.md index 5a2e63e..2e227b7 100644 --- a/tutorials/installing_anaconda.md +++ b/tutorials/1_02_installing_anaconda.md @@ -1,36 +1,38 @@ -# Installing Anaconda Navigator +# Installing Anaconda -This tutorial walk will walk through how to install Anaconda Navigator. +This tutorial will cover the steps on how to install Anaconda. + +*Note for Advanced users: For those who wish to have a lightweight installation, can install miniconda or miniForge, however for this course we will show you how to use Anaconda Navigator. If you've never used the programs before then using Anaconda is recommended.* ### What is Anaconda? +From the Anaconda website <quote> Anaconda is an open source data science and artificial intelligence distribution platform for Python and R programing language. -Wikipedia </quote> ### What is Navigator? -Anaconda Navigator is a desktop graphical user interface (GUI) inluded in Anaconda distribution that allows users to launch application and manage Conda Packages, environments and channels without using a command-line interface (CLI). -Wikipedia +Anaconda Navigator is a desktop graphical user interface (GUI) included in Anaconda distribution that allows users to launch application and manage Conda Packages, environments and channels without using a command-line interface (CLI). -Wikipedia ## Instructions -1. Find the latest version of Navigator from the official Anaconda Inc. website: https://www.anaconda.com/products/navigator https://www.anaconda.com/download +1. Find the latest version of Navigator from the official Anaconda Inc. website: [Download Anaconda](https://www.anaconda.com/download) 2. Press the *Download Now* button. -3. Press the *Skip registration* button or submit your email address to subscribe to the Anaconda email list. +3. Press the *Skip registration* button below the submit button, otherwise submit your email address to subscribe to the Anaconda email list. 4. Under Anaconda Installers press *Download* or find the appropriate version for your operating system below. Proceed to next section for your respective operating system. ### Windows - +Depending on what browser you use, it should look something like this:  - - -Once the download is complete, double click the executible (.exe) file to start the installer. Proceed with the installation instructions, you should be able to leave most option in default settings. +Once the download is complete, double click the executible (.exe) file to start the installer. Proceed with the installation instructions.   +Depending on whether you wish to install Anaconda on   @@ -48,10 +50,7 @@ Once the download is complete, double click the executible (.exe) file to start  -Note: If you did not select start navigator after installation, you will need to go to you start menu and start Navigator from Applications list. - -### Mac -For Mac user +You made it! Anaconda is now installed. Assuming that you didn't add Anaconda to PATH environment variable you will need to start navigator from the start menu. -### Linux -Refer to your distribution's documentation on how to install Anaconda. For a ligt-weight installation. Miniconda and Spyder +### Mac/Linux +Anaconda provides installation documentation for Mac and Linux users, please refer to the [documentation page](https://docs.anaconda.com/anaconda/install/). diff --git a/tutorials/intro_to_anaconda.md b/tutorials/1_03_intro_to_anaconda.md index f05cb4c..841dfdd 100644 --- a/tutorials/intro_to_anaconda.md +++ b/tutorials/1_03_intro_to_anaconda.md @@ -48,13 +48,13 @@ Now that we have a clean environment configured, let us install some library we 2. Use the search bar in the top right corner to search for the following packages: -| Library | Usage | -| ---------- | ---------------------------------------------------- | -| numpy | Numerical computation | -| scipy | Scientific and techical computing | -| pandas | Data manipulation and analysis | -| matplotlib | Plots and visualizations | -| sympy | Symbolic mathematics | -| cython | Optimizing Python code and interfacing with C++ code | - -3. Once the +| Library | Usage | +| ---------- | --------------------------------- | +| numpy | Numerical computation | +| scipy | Scientific and techical computing | +| pandas | Data manipulation and analysis | +| matplotlib | Plots and visualizations | +| sympy | Symbolic mathematics | +*Note: The libraries list may change as the course develops* + +1. Once the diff --git a/tutorials/1_04_spyder_getting_started.md b/tutorials/1_04_spyder_getting_started.md new file mode 100644 index 0000000..03b7fd3 --- /dev/null +++ b/tutorials/1_04_spyder_getting_started.md @@ -0,0 +1,27 @@ +# Getting started with Spyder + +In this tutorial we will cover the basics of the Spyder IDE (Interactive Development Environment). If you've ever worked with MATLAB before, then this will feel familiar. Spyder is a program + + +## Launching Spyder +Using Anaconda we will select the environment we created earlier *spyder-dev*. + + +## Spyder Interface + + + +Once you open up Spyder in it's default configuration, you'll see three sections; the editor IPython Console, Help viewer. You can customize the interface to suit your prefference and needs some of which include, rearrange, undock, hide panes. Feel free to set up Spyder as you like. + +### Editor +This pane is used to write and save scripts. + + +### IPython Console +This pane allows you to run commands, functions, do math computations and assign variables. + +### Variable Explorer +This pane shows all the variables stored once you've + +### Help Viewer + diff --git a/tutorials/basics_of_python.md b/tutorials/1_05_basics_of_python.md index 5c12ff4..cb74910 100644 --- a/tutorials/basics_of_python.md +++ b/tutorials/1_05_basics_of_python.md @@ -66,26 +66,23 @@ The most common data types that an engineer encounters in python are numeric typ - 'float' - a decimal number - 'complex' - imaginary number - The comprehensive table below show all built-in data types available in python. - - -| Category | Data Type | -| ---------- | ------------------------- | -| Text | int, float, complex | -| Sequance | list, tuple, range | -| Mapping | dict | -| Set | set, frozenset | -| Boolean | bytes, bytearray, memoryview | -| Binary | bytes, bytearray, memoryview | -| None | NoneType | +| Category | Data Type | +| -------- | ---------------------------- | +| Text | int, float, complex | +| Sequance | list, tuple, range | +| Mapping | dict | +| Set | set, frozenset | +| Boolean | bytes, bytearray, memoryview | +| Binary | bytes, bytearray, memoryview | +| None | NoneType | ## Variables A **variable** in Python is a name that stores a value, allowing you to use and manipulate data efficiently. -#### 1. Declaring and Assigning Variables +#### Declaring and Assigning Variables In Python, you don’t need to declare the type of a variable. Just assign a value using `=`. @@ -96,14 +93,25 @@ name = "Joe" # String is_valid = True # Boolean ``` -#### Rules +You can assign multiple variables at once: + +```python +a, b, c = 1, 2, 3 +``` + +Similarly we can assign the same value to multiple variables: + +```python +x = y = z = 100 +``` +##### Rules - Must start with a letter or `_` - Cannot start with a number - Can only contain letters, numbers, and `_` - Case-sensitive (`Name` and `name` are different) -#### **4. Updating Variables** +#### Updating Variables You can change a variable’s value at any time. @@ -118,21 +126,7 @@ Or shorthand: x += 10 # Same as x = x + 10 ``` -#### **5. Multiple Assignments** - -You can assign multiple variables at once: - -```python -a, b, c = 1, 2, 3 -``` - -Similarly we can assign the same value to multiple variables: - -```python -x = y = z = 100 -``` - -#### **6. Variable Types & Type Checking** +#### Variable Types & Type Checking Use `type()` to check a variable’s type. @@ -145,11 +139,3 @@ print(type(y)) # Output: <class 'str'> ``` -#### 8. Deleting Variables - -Use `del` to remove a variable: - -```python -x = 10 -del x -``` diff --git a/tutorials/arrays.md b/tutorials/1_06_arrays.md index e698d67..b16e7fc 100644 --- a/tutorials/arrays.md +++ b/tutorials/1_06_arrays.md @@ -10,6 +10,7 @@ A two-dimensional array would be like a table: | 8 | 3 | 6 | 1 | | 1 | 7 | 2 | 9 | + A three-dimensional array would be like a set of tables, perhaps stacked as though they were printed on separate pages. - From [Numpy documentation](https://numpy.org/doc/2.2/user/absolute_beginners.html) @@ -22,14 +23,24 @@ Since we already have installed Numpy previously, we can start using the package ## Import Numpy When using packages in python, we need to let it know what package we will be using. This is called importing. To import numpy we need to declare it a the start of a script as follows: -``` +```python import numpy as np ``` <code> import </code> calls for a library to use, in our case it is Numpy. <code> as </code> gives the library an alias in your script. It's common convention in Python programming to make the code shorter and more readable. We will be using *np* as it's a standard using in many projects. # Creating arrays -Now that the script has been +Now that we have imported the library we can create a one dimensional array or *vector* +```python +x = np.array([1,2,3]) ``` + +To create a *matrix* we can nest the arrays to create a two dimensional array. + +```python +matrix = np.array([[1,2,3],[4,5,6],[7,8,9]]) ``` + +*Note: for every array we nest, we get a new dimension in our data structure.* + diff --git a/tutorials/1_07_control_structures.md b/tutorials/1_07_control_structures.md new file mode 100644 index 0000000..245ef5a --- /dev/null +++ b/tutorials/1_07_control_structures.md @@ -0,0 +1,10 @@ +# Control Structures +Control structures allow us to control the flow of execution in a Python program. The two main types are **conditional statements (`if` statements)** and **loops (`for` and `while` loops)**. + +## Conditional statements +Conditional statements let you execute code based on different conditions using if, elif and else statements. + + + + +## Loops diff --git a/tutorials/Classes_and_Objects.md b/tutorials/1_classes_and_objects.md index 0392483..0392483 100644 --- a/tutorials/Classes_and_Objects.md +++ b/tutorials/1_classes_and_objects.md diff --git a/tutorials/computing_fundamentals.md b/tutorials/1_computing_fundamentals.md index 1fef338..1fef338 100644 --- a/tutorials/computing_fundamentals.md +++ b/tutorials/1_computing_fundamentals.md diff --git a/tutorials/Functions.md b/tutorials/1_functions.md index e4c9874..e4c9874 100644 --- a/tutorials/Functions.md +++ b/tutorials/1_functions.md diff --git a/tutorials/fundamentals_of_programming.md b/tutorials/1_fundamentals_of_programming.md index 617d2c3..617d2c3 100644 --- a/tutorials/fundamentals_of_programming.md +++ b/tutorials/1_fundamentals_of_programming.md diff --git a/tutorials/1_open_source_software.md b/tutorials/1_open_source_software.md new file mode 100644 index 0000000..924878b --- /dev/null +++ b/tutorials/1_open_source_software.md @@ -0,0 +1,41 @@ +# Open Source Software + +Open-source software (OSS) is a type of software that allows users to access, modify, and distribute its source code freely. It is built on principles of collaboration, transparency, and community-driven development. + +### Key Principles of Open Source Software + +- **Free Distribution:** Anyone can download and use the software without cost. +- **Access to Source Code:** Users can view and modify the code to suit their needs. +- **Community Collaboration:** Developers from around the world contribute to improvements and security fixes. + +### Benefits of Open Source Software + +- **Cost-effectiveness:** Open-source software is free to use, making it accessible to individuals and organizations. +- **Transparency and Security:** Open code allows for peer review, reducing security vulnerabilities. +- **Community Support:** Global developer communities provide assistance, troubleshooting, and improvements. +- **Customization and Flexibility:** Users can modify software to fit their specific requirements. + +### Challenges of Open Source Software + +- **Usability Issues:** Some open-source software may have a steeper learning curve. +- **Compatibility Problems:** Integration with proprietary systems may require additional effort. +- **Support and Documentation:** The quality of documentation and support varies. +- **Sustainability:** Open-source projects often rely on volunteers, which can lead to inconsistent updates. + +### Popular Open Source Projects + +- **Operating Systems:** Linux, Ubuntu +- **Web Browsers:** Mozilla Firefox +- **Programming Languages:** Python, JavaScript +- **Office Suites:** LibreOffice +- **Multimedia Tools:** Audacity, Blender +- **Software Development:** Git, GitHub, Apache + +### How to Contribute to Open Source + +- **Finding Projects:** Platforms like GitHub, GitLab, and SourceForge host many open-source projects. +- **Understanding Licensing:** Common licenses include GPL, MIT, and Apache. +- **Ways to Contribute:** Developers can contribute code, test software, write documentation, translate, or help with design. +- **Best Practices for Contributions:** Using version control (Git), writing clean code, and following community guidelines are essential for successful collaboration. + +## Licensing diff --git a/tutorials/2_01_introduction_to_numerical_methods.md b/tutorials/2_01_introduction_to_numerical_methods.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tutorials/2_01_introduction_to_numerical_methods.md diff --git a/tutorials/2_ai_assisted_programming.md b/tutorials/2_ai_assisted_programming.md new file mode 100644 index 0000000..e2b39a0 --- /dev/null +++ b/tutorials/2_ai_assisted_programming.md @@ -0,0 +1,5 @@ +AI assisted programming + +- GitHub Copilot +- ChatGPT +- AIXcoder diff --git a/tutorials/control_structures.md b/tutorials/control_structures.md deleted file mode 100644 index 345d94a..0000000 --- a/tutorials/control_structures.md +++ /dev/null @@ -1,5 +0,0 @@ -# Control Structers - -## If statements - -## Loops diff --git a/tutorials/open_source_software.md b/tutorials/open_source_software.md deleted file mode 100644 index 0a10f27..0000000 --- a/tutorials/open_source_software.md +++ /dev/null @@ -1,4 +0,0 @@ -# Open Source Software - - -## Licensing diff --git a/tutorials/readme.md b/tutorials/readme.md index 283c1ad..fcc2283 100644 --- a/tutorials/readme.md +++ b/tutorials/readme.md @@ -3,16 +3,17 @@ This directory contains all the tutorials. ## Table of Content ### Introductory Programming Concepts -- [Installing Anaconda](installing_anaconda.md) -- [Intro to Anaconda](intro_to_anaconda.md) -- [Getting started with Spyder](spyder_getting_started.md) -- [Fundamentals of Computing](fundamentals_of_programming.md) -- [Open source_software](open_source_software.md) -- [Basics of python](basics_of_python.md) -- [Arrays](arrays.md) -- [Control Structures](control_structures.md) -- [Functions](Functions.md) -- [Classes/Objects](Classes_and_Objects.md) +- [Introduction to Programming](1_01_intro_to_programming) +- [Installing Anaconda](1_02_installing_anaconda.md) +- [Intro to Anaconda](1_03_intro_to_anaconda.md) +- [Getting started with Spyder](1_04_spyder_getting_started.md) +- [Fundamentals of Computing](1_fundamentals_of_programming.md) +- [Open source_software](1_open_source_software.md) +- [Basics of python](1_05_basics_of_python.md) +- [Arrays](1_06_arrays.md) +- [Control Structures](1_07_control_structures.md) +- [Functions](1_functions.md) +- [Classes/Objects](1_classes_and_objects.md) ### Algorithm Developments for ME - [Version Control](version_control.md) diff --git a/tutorials/spyder_getting_started.md b/tutorials/spyder_getting_started.md deleted file mode 100644 index 8a7f566..0000000 --- a/tutorials/spyder_getting_started.md +++ /dev/null @@ -1,10 +0,0 @@ -# Getting started with Spyder - -In this tutorial we will cover the basics of the Spyder IDE (Interactive Development Environment). If you've ever worked with MATLAB before, then this will feel familiar. Spyder is a program - - -## Launching Spyder -Using Anaconda we will select the environment we created earlier. - - -## Spyder Interface |
