0

Python. Can someone please explain what does it mean a value can be defined?

30th Apr 2019, 10:47 AM
JohnSia2005
6 Réponses
+ 4
It means you give a name to a value. x = 5 Now x is defined as refering to the integer 5, and whenever you write x in your code, it will mean 5. print(x) Output: 5
30th Apr 2019, 10:55 AM
HonFu
HonFu - avatar
+ 1
Thx
30th Apr 2019, 10:56 AM
JohnSia2005
+ 1
HonFu or simply, variable got name and alocate memory for given type (int, bool, string etc.).😎
30th Apr 2019, 11:11 AM
Aleksandar Nedeljkovic
Aleksandar Nedeljkovic - avatar
0
Aaaa
30th Apr 2019, 10:56 AM
JohnSia2005
0
In Python, variable doesen't have type by default cause type are defined thru char at right side.
30th Apr 2019, 11:12 AM
Aleksandar Nedeljkovic
Aleksandar Nedeljkovic - avatar
0
Thx
30th Apr 2019, 11:13 AM
JohnSia2005