0
Variables
Hello, I'm using Python, I'm learning to declare variables, but when I declare them, it seems It doesn't work, when I use print() it doesn't display the value of the variable, how do you declare a certain one?
3 Respuestas
+ 5
Hello Pedro Cardoso Oliveira. Welcome to the Sololearn community!
In order for us to figure out what is not working correctly we need to see what code you have tried. Please post a copy of the code here; or better yet, post a link to it from your profile Code Bits (tap the circled + in the Comment reply box then find your code).
+ 1
Pedro Cardoso Oliveira
You must pass a variable to print()
The print() will output a blank line
For example :
a=2
Print(a)
Output:
2
0
I can just guess that you are not aware of syntax to declare and print
If it's that then I would recommend learning syntax
It's like
variable_name = value
print(variable_name)
Where you should follow the norms of writing variable_name and the value can be any form of python data type.
So I recommend you to go through 'python for beginners'
==
If it's not the issue then please refer the code in the discussion as Sir Brian mentioned.