Variables , Data Types, Casting in Python by coding xpertz

Publicado em: 18 Fevereiro 2023
no canal de: Coding Xpertz
27
0

The 1st thing to know is that all Python files end with the extension .py. Then you have to
understand that every programming language must have the ability to Accept, Store and Name
Data.
You have to be able to receive data from the keyboard, or from other parts of your program and
assign a name to that data. This data is either a single value or multiple values that are
assigned a name. Data that is assigned a name and that contains data is called a Variable.
Python has many different ways to store lists of data which I’ll cover later.
It is convenient to assign names to data. If I want to store my age in Python I’d type my_age =
43. If I wanted to store my name I’d type my_name = “Derek”.
Rules for Naming Variables
Your variables can start with a letter or _ (Underscore)
After the 1st letter you can use numbers such as num_1
You can’t put spaces in variable names my_age is ok, but my age is not
It is considered good practice to separate words with underscores (my_age vs. myAge)
Keywords that you can’t us for variable names
and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break,
except, import, print, class, exec, in, raise, continue, finally, is, return, def, for, lambda,
try
Try running this code where you assign your name to a variable and then print a message.


Nesta página do site você pode assistir ao vídeo on-line Variables , Data Types, Casting in Python by coding xpertz duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Coding Xpertz 18 Fevereiro 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 27 vezes e gostou 0 espectadores. Boa visualização!