ython variables do not comprise to be explicitly


ython variables do not comprise to be explicitly declared to already reserve memory space. The declaration occurs automatically when you allocate a value to a variable. The equal sign (=) is used to allocate values to variables.
The operand to the right of the = operator is the value stored in the variable and the operand to the left of the = operator is the name of the variable. for instance:

#!/usr/bin/python

counter = 1000 # An integer assignment
miles = 10000.0 # A floating point
name = "William" # A string

print counter
print miles
Print name
Here 100, 1000.0 and “William " is the values assigned to counter, miles and name variables, in that order. While running this program, this will generate following outcome:
1000
10000.0
William

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: ython variables do not comprise to be explicitly
Reference No:- TGS0154925

Expected delivery within 24 Hours