RUVIDEO
Поделитесь видео 🙏

What is coding? | Simple Calculator in Python | Python Programming Part-3 смотреть онлайн

Python coding for beginners.

Hi, this is Aarav Ajai, hope you all are doing safe and keeping fine. Welcome back to the Python learning series of Seamless info YouTube channel.
In this episode, we are going to learn how to build a very simple and easy calculator in python.

When, we start learning Python, the first thing we would want to code is a calculator, right?
So, here we go.
Wait Before we start, let’s keep few things in mind.
Here we will be using -
1) variables
2) input function
3) print function
4) conditional statements and
5) arithmetic operators

Variables, Input function and Print functions have been explained in my previous videos. So, I am not touching on that. You may refer the i-button above.
Now coming to Conditional Statements:
In this program, we need multiple conditions, so, to keep it very simple, we use if-elif-else statement. This statement provides a compact way to perform multiple tests on a condition.

Now, let us see what is Arithmetic Operators. As you know that, every calculator needs operators. Right?

In Python, we mostly use 7 operators i.e., Addition (+), Subtraction (-), ,Division(/) , Multiplication(* ) ,Remainder(%) ,Floor Division(//) and Exponential(**)
The symbols used for these operators in python are quite different.
For Addition and Subtraction it is the same but for Multiplication it is the asterisk symbol and for division it is it is the forward slash.
For remainder it is the “percentage” symbol or in python we call it the modulo operator , for exponential it is two asterisk symbols and for Floor Division is it two forward slash .
The difference between Division and Floor Division (integer division) is that when we do division ,it divides the number and gives an output in decimal form and when we do floor division it divides the number and gives an output in integer form.

Now let’s start coding You are with me, right?.
I hope this information will kickstart your journey in python.

This is the code for the above explained python calculator :

num1= float(input("Enter the first number: "))
op=input("Enter a Arithmetic Operator: ")
num2= float(input("Enter the second number: "))

if op=="+":
print(num1+num2)
elif op =="-":
print(num1-num2)
elif op=="*":
print(num1*num2)
elif op=="/":
print(num1/num2)

else:
print("The operator you have typed is Invalid ")

Thanks for watching this video, we will meet with another informative video.

To view more videos;
https://youtu.be/WxkVP8GbEeA
https://youtu.be/EI_fOU0cHik
https://youtu.be/-hvYbv5zS50
https://youtu.be/N6UkUTdAPHM
https://youtu.be/ZTUni7m2X_I
https://youtu.be/44B1VkHeUto
https://youtu.be/JZEGoRG4QLc
https://youtu.be/87NpQqXzgfo
https://youtu.be/ietU6NhFDOU

#WhatisCoding
#Python
#coding
#code

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «What is coding? | Simple Calculator in Python | Python Programming Part-3» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.