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.
На этой странице сайта вы можете посмотреть видео онлайн Variables , Data Types, Casting in Python by coding xpertz длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Coding Xpertz 18 Февраль 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 27 раз и оно понравилось 0 зрителям. Приятного просмотра!