Variable Declarations in Python.
#
Variable Definition
num = 150 # An
integer assignment
mtrs =
15000.0 #
A floating point
name =
"Wilson Alfred" # A string
print(num)
print(mtrs)
print(name)
print()
#Multiple Assignment
n, r, s =
10, 25.5, "Hello Python"
print(n) # An
integer number
print(r) # A
floating number
print(s) # A
String
Output
>>>
150
15000.0
Wilson Alfred
10
25.5
Hello Python
>>>
No comments
Post your comments