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

Value replacement for a variable | Python Episode 04 | SL Android

📁 Обучение 👁️ 18 📅 03.12.2023

What is a Variable in Python?

A Python variable is a reserved memory location to store values. In other words, a variable in a python program gives data to the computer for processing.

Every value in Python has a datatype. Different data types in Python are Numbers, List, Tuple, Strings, Dictionary, etc. Variables can be declared by any name or even alphabets like a, aa, abc, etc.

In this tutorial, we will learn,

How to Declare and use a Variable

Re-declare a Variable

Concatenate Variables

Local & Global Variables

Delete a variable

How to Declare and use a Variable

Let see an example. We will declare variable "a" and print it.

a=100 print (a)

Re-declare a Variable

You can re-declare the variable even after you have declared it once.

Here we have variable initialized to f=0.

Later, we re-assign the variable f to value "guru99"



Python 2 Example

# Declare a variable and initialize it f = 0 print f # re-declaring the variable works f = 'guru99' print f

Python 3 Example

# Declare a variable and initialize it f = 0 print(f) # re-declaring the variable works f = 'guru99' print(f)

Concatenate Variables

Let's see whether you can concatenate different data types like string and number together. For example, we will concatenate "Guru" with the number "99".

Unlike Java, which concatenates number with string without declaring number as string, Python requires declaring the number as string otherwise it will show a TypeError



For the following code, you will get undefined output -

a="Guru" b = 99 print a+b

Once the integer is declared as string, it can concatenate both "Guru" + str("99")= "Guru99" in the output.

a="Guru" b = 99 print(a+str(b))



මෙතෙක් පලවූ සියලු වීඩියෝ මෙම post එක පහල දාලා තියෙනවා මුල ඉදලාම බලලා ඉගෙනගන්න.

Chanel එක subscribe කරලා සහයෝගය ලබාදෙන්න,අනිත් අයටත් බලන්න share කරන්න.

Episode 01 - python හැඳින්වීම
https://youtu.be/xwxauFsCYmk

Episode 02 - විචල්යන් (variables )
https://youtu.be/0OpPQ51v0hs

Episode 03 - විචල්ය නාමකරණය
https://youtu.be/5ESY5G6-NAU

Episode 04 - විචල්ය පැවරුම්
https://youtu.be/AZqpxVAjfvU

Episode 05 - print function
https://youtu.be/k18CYJPWm3E

Episode 06 - python Data types
https://youtu.be/9AjunP0EYy0

Episode 07 -input function in python
https://youtu.be/0xrIK1kbfok

Episode 08 - Python Comments
https://youtu.be/hh2eiYwON4o

Episode 09 -len Function in Python
https://youtu.be/vSkwUTjh97Y

Episode 10- sep & end in python
https://youtu.be/VUfBgzGYNkw

Episode 11 -index operator in python
https://youtu.be/7UyVUimLR04

Episode 12 -Slicing operator in python
https://youtu.be/a4Ss_7HJpyU

-~-~~-~~~-~~-~-
Please watch: "How to code a simple calculator ( Project 01) |C Programming සිංහල Tutorial Episode 25 |SL Android"
https://www.youtube.com/watch?v=A6nvSvDcsUA
-~-~~-~~~-~~-~-

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Value replacement for a variable | Python Episode 04 | SL Android», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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