WEBVTT

00:00.000 --> 00:19.000
Arithmetic operations in Python will explore a key concept in programming arithmetic operations and by the end you'll be able to understand basic arithmetic in Python, examples of arithmetic operations,

00:19.000 --> 00:41.000
what is arithmetic in Python? Arithmetic in Python means using basic math operations like addition, subtraction, multiplication, and division in your code, for example, plus to add, 2 plus 3, minus to subtract like 5 minus 2, examples of arithmetic operations.

00:41.000 --> 00:59.000
Now that we know how the basic arithmetic operators work in Python, addition example, scenario, you have 10 books and by 10 more, type, operation, books equals 10 plus 10, variable, books now holds the value 20.

00:59.000 --> 01:09.000
Printing arithmetic operations, to see the output of this arithmetic operation, we use the print function, type, print, books.

01:09.000 --> 01:38.000
When you run the code, you will see the sum value in the console. Practice different arithmetic operations, how to calculate the total price of multiple items, type, pen price equals 10, pencil price equals 5, book price equals 20, total price equals pen price plus pencil price plus book price, print, total price, total price.

01:38.000 --> 02:01.000
Click on run to execute the code, you will see the sum value in the console, add discount. Now we will write a code for a discount of 10% on the given data, we will add a line after the total price, discount equals total price, minus 0.1 multiplied by total price.

02:02.000 --> 02:13.000
The star symbol is the multiplication operation, now change the value in the print function, print, total price, discount.

02:13.000 --> 02:25.000
Click on run to execute the code, you will see the price with discount in the console, feel free to experiment with different scenarios and arithmetic operations and run the code again.

02:25.000 --> 02:33.000
Programming allows you to explore different possibilities, so try out new operations and scenarios to see how they impact the output.

