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

Python | If and Else statements | Beginner Python | Python Course | Episode 3 смотреть онлайн

Hey guys, Today we will be talking about variables
Look below for more information



Python is a programming language used to build A.I.(Artificial Intelligence),
Websites, and many MORE!!!!
In this video, we talked about If-else statements
if and else statements are basically tells the code if this statement is True, it's going to do something OTHERWISE, do something else
The way that you write is. First,
NOTE: # means to comment
you say:
if #write condition:
#do something
else:
#do something else

so first let's take 2 variables
a = 5
b = 2
Let's say that I want to print out ' a is smaller than b' ONLY if a is smaller than b. In my case the VARIABLE a is not smaller than B.
So the way that we can say is
(NOTE: The greater sign in disabled for me due to the youtube description polices)
(NOTE: so, I will say word 'Greater*' as the greater than sign
if a Greater* b:
print('a is smaller than b')
else:
print('b is smaller than a')
Correct Output: b is smaller than b
Of course, you can say more than if statements
you can say:

(NOTE: The greater sign in disabled for me due to the youtube description polices)
(NOTE: so, I will say word 'Greater*' as the greater than sign)
a = 2
b = 2
if a Greater* b:
print('a is smaller than b')
elif a == b:
print('a is equal to b')
else:
print('b is smaller than a')
Correct Output: a is equal to b
REMEMBER THAT INDENTION ARE VERY IMPORTANT

Special Keys:
THERE IS A DIFFERENCE BETWEEN '=' and '==' in python( in any language)
'=' means equal
'==' means when you want to compare 2 objects.
Greater* sign and = means Greater than or equal to
Less* sign and = means less than or equal to
* means mulitplication
- means subtraction
+ means addition
/ means division
** means square
% means module or Remainder
# means comment




Variables are used to hold one or more values. Instead of repeating words, you can use variables to write your code much faster
There are 4 types of variables
Float:
A number that is decimal
Example-
3.45 , 2.44 , 34.34, 90.10
Integer:
A number that is whole numbers and has negative numbers
Example:
4, 5, 99, -100, -12, 34 , 1000000, -10909090
String:
Sequence of characters inside the quotation marks
Example:
"HELLO", " Python , " dw"
NOTE:
If you say "30" in python, it's a string because the you put the number
30 inside the quotation marks so if you said "30" + "20", it would say
3020
Booleans:
True or False
You would use Booleans ,in most cases, in For loops, if and else statements, while loops and many more!
The reason you would use this is because you can if found = True, do this otherwise(else) found = False, do this instead
Quick facts:
You can convert float to a int but you can't convert int to a float.

How you write Variables:
Write any Character and say '=' and choose one of the option above
Example :
a = 10 - integer
b = 10.23 - float
c = 'HELLOOO' - string
d = True - boolean
MAKE SURE YOU HAVE RIGHT INDENTIONS
THERE IS A DIFFERENCE BETWEEN '=' and '==' in python( in any language)
'=' means equal
'==' means when you want to compare 2 objects.





Great IDE's
https://www.python.org - to have python installed
https://code.visualstudio.com - to have an IDE (You can use any IDE but I am going to use Vscode)
Other great IDE's:
https://atom.io - atom
https://www.jetbrains.com/pycharm/ - This IDE is only for Python so you won't be able to do like Java, Javascript and more
https://www.sublimetext.com/ - Sublime Text
https://www.anaconda.com/ - You don't have to download PYTHON.ORG for using this because Anaconda is like Python.org(It has python installed). Use spyder in anaconda if you are downloading this. (NOTE: You can only program PYTHON). This is really great for BEGINNERS.

Special things on Python(Covered in THIS video)
Indention :
You won't put brackets when putting for loops, if and else statements, while loops and many more!!

# means to comment code

for i in range(0,100): # the print('HELLO') is in the for loop
print('Hello')
--------------------------------
for i in range(1,101): # error because print is not in the for loop
print('Hello')
----------------------------------
IMPORTANT FACTS:
-1 indent is equal to 4 spaces
- you have to have something in the for loop or else you will get an EOF error
-KEEP CODING :)

I will be doing more Python tutorial's in the future so you don't want to miss out

Please Like, Subscribe and Share the video

KEEP CODING :)

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python | If and Else statements | Beginner Python | Python Course | Episode 3» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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