how to assign Values to Variables in python?, Basic Computer Science

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
Posted Date: 5/5/2012 3:36:45 AM | Location : United States







Related Discussions:- how to assign Values to Variables in python?, Assignment Help, Ask Question on how to assign Values to Variables in python?, Get Answer, Expert's Help, how to assign Values to Variables in python? Discussions

Write discussion on how to assign Values to Variables in python?
Your posts are moderated
Related Questions

Search in Problem Solving: If Artificial intelligence I may inform the other sciences about anything, it is about problem solving and, in specific, how to find solutions to pro

Two-tiered architecture: This approach basically introduced a database server to replace the file server. The emergence of relational database management systems and graphica

Digital Transmission: In digital transmission, wave patterns are translated into discrete bits and are separated by intervals. Bits (contraction for binary digits) are the sma

WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL MARKS AND PERCENTAGE

#to determine whether given year is leap year or not

Software: A computer system consists of two parts - hardware and software. The first part, computer hardware, refers to all the visible components of the computer system:  key

It's a common protocol or "language" computers use to "speak" to each other over the Web.

What role would you assign to each of the four workstation and any other equipment

7. Name and explain the action in Conceptual Dependency which refers to a transfer of possession.