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
G e ne ric Techniques Developed: In  the  pursuit  of  solutions  to  many   problems  in  the  above  categories,  serval specific  techniques have sprung up which have bee

what protocol is used by DNS name server

The data stored in memory can be of a lot of types. In case, a person’s age is stored as a numeric value and his or her address is stored as alphanumeric characters. Python has som

AUDIO/VIDEO APPLICATIONS ON NETWORK Clinical applications of a computer include recording of slit lamp images on a computer. These still images or even videos can be recorde

Concept of instruction: The CPU is a semiconductor integrated  circuit chip consisting of a large number of transistors. In personal computers, the CPU is also referred by the

Design Problem 1. Implement a basic file system managed from within a file. The file system should have the following capabilities: i. List files stored along with their sizes.

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

To satisfy client needs through proxy server and not through main server, as some other user have already accessed that file and its copied to the proxy server, so next time a user

Need of operating system: What kind of facilities operating system provides to the users and programs: The operating system provides interfaces for the user (keyboard, m

#question.a tree has 0 off springs at each node. if it had a label L, what will be the maximum number of nodes that the tree can have. only an expression involving the number of no