0
the print statment 2nd question while loops tut
hello! in the "print" line, why theres no need to put the variable x in the midle of the "", in other words, in the question is writen print(x) insted of print("x") and it works. but I tried to do with other statment's and doesn't works! thank's =)
3 Respostas
+ 3
>>> x=99 # x is an integer
>>> print(x)
99
>>> print(99) # a number (variables cannot start with numbers)
99
>>> print("x") # string that happens to be letter x
x
>>> x="xX" # x is now a string of two letters
>>> print(x)
xX
+ 2
because x is a variable that you've already declared and "x" is a string
+ 2
x holds a value, while "x" is a value