Let's get started! 🔥🔥🔥 In this video, we will show you how to write a few PYTHON 🐍 scripts to use several mathematical Python operators that allow you to perform typical mathematical operations ➕➖ on numeric data when building real-world Python programs. In this lesson, you will learn some basics in about 10 minutes!
🚨 Keep in mind that there are more complex operations available from the Python math module. In addition, there are mathematical operations and data science and visualization functionality from third-party open source libraries, such as Pandas, NumPy, SciPy, Matplotlib, and many others. 📊📈 They are extremely useful in data science, data visualization, and machine learning.
In this video, you will learn how to:
★ 0:09 Perform various mathematical operations.
★ 3:07 Control the default order of operations, following PEMDAS.
★ 5:26 Investigate division more closely.
★ 6:21 Convert a float into an int.
★ 9:38 Round to a specific decimal place.
Tips and Tricks:
► Operators are mini shortcut functions that perform an operation on one or more operands.
►The order of mathematical operations in Python follows the rules of PEMDAS.
Parentheses: Resolve operations between parentheses first.
Exponents: Resolve exponents.
Multiplication: Perform multiplication, from left to right.
Division: Perform division, from left to right.
Addition: Perform addition, from left to right.
Subtraction: Perform subtraction, from left to right.
► In Python 3, division of two ints produces a float.
► Values after the decimal are truncated and lost when a value of type float is converted to a value of type int.
►Use the round() function to control how values are rounded. It defaults to 0 places after the decimal, which gives you an int value. If the *optional* second argument is supplied, you can control the number of decimal places to round to.
WANT MORE PYTHON TUTORIALS?
🐍 Python Coding for Beginners:
For the setup, please read the followings before you begin:
1. Download latest Python: https://www.python.org/downloads/
2. Install Python and remember to select "Add Python... to PATH" when asked.
3. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.
Python - a programming language used by world-class companies such as Amazon.com, Alphabet (Google), Facebook, Twitter, and NASA.
👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻💻👩🏻💻 YOUTUBE CHANNEL NOW 👇
#CodingWithKids #PythonProgramming #PythonForBeginners