From d15b47d5a0a58515b64e2f57d4b6ab2b86e404be Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Wed, 5 Feb 2025 16:53:27 -0700 Subject: Renamed tutorials and updated links in tutorial/readme.md --- tutorials/3.1_basics_of_python.md | 83 --------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 tutorials/3.1_basics_of_python.md (limited to 'tutorials/3.1_basics_of_python.md') diff --git a/tutorials/3.1_basics_of_python.md b/tutorials/3.1_basics_of_python.md deleted file mode 100644 index abced24..0000000 --- a/tutorials/3.1_basics_of_python.md +++ /dev/null @@ -1,83 +0,0 @@ -# Basics of Python - -^88ce39 - -This page contains important fundamental concepts used in Python such as syntax, operators, order or precedence and more. - -## Syntax -In python *indentations* or the space at the start of each line, signifies a block of code. This becomes important when we start working with function and loops. - -## Operators -### Arithmetic operators -| Operator | Name | -| --- | --- | -| + | Addition | -| - | Subtraction | -| * | Multiplication | -| / | Division | -| % | Modulus | -| ** | Exponentiation | -| // | Floor division | - - -### Comparison operators -| Operator | Name | -| --- | --- | -| == | Equal | -| != | Not equal | -| > | Greater than | -| < | Less than | -| >= | Greater than or equal to | -| <= | Less than or equal to | - -### Logical operators -| Operator | Descrription | -| --- | --- | -| and | Returns True if both statemetns are true | -| or | Returns True if one of the statements is true | -| not | Reerse the result, returns False if the result is true | - -### Identity operators -| Operator | Description | -| --- | --- | -| is | Returns True if both variables are the same object | -| is not | Returns True if both variables are not the same object | - -## Order of Operation -| Operator | Description | -| --- | --- | -| () | Parentheses | -| ** | Exponentiation | -| * / // % | Multiplication, Division, floor division, and modulus | -| & | AND | -| ^ | XOR | -| \| | OR | -| == | Comparision, identity and membership operators | -| not | logical NOT | -| and | AND | -| or | OR | - -## Comments -Comments can be added to your code using the hash operator (#). Any text behind the comment operator till the end of the line will be rendered as a comment. - -## Data types -Data types are different ways a computer stores data. Other data types use fewer bits than others allowing you to better utilize your computer memory. This is important for engineers because -The most common data types that an engineer encounters in python are numeric types. -- 'int' - integer -- '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 | -- cgit v1.2.3