0
how to declare variables
4 Respuestas
+ 2
In the course, Basic Concepts module 10: Variables. Basically assign something a value.
like...
a=1
edit: Thomas's answer looks better :)
+ 1
in python you can declare variables everywhere, just make sure you do so before using the variable
ex: a=5
print(a)
not: print(a)
a=1
+ 1
In the beginning of the program declare the variables for eg,
x=10
print(x)
+ 1
You don't have to declare it separately. You need to initialise it anywhere in the code before you print the variable.