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
Opening Documents Situated on Different Computers In order to work with documents situated on other computers, you need sufficient rights to access the folder in which it is


Technology Partnerships: Such agreements provide the consumer un-limited access to vendor's technology. Such contracts are typically multi-year in nature where the consumer pa

Types of Printers 1. Impact printers The impact printers produce the image through a mechanism of striking on the stationary. 2. Line Printer This type of printer

Machines which exhibit intelligent nature Machines in this case could easily be personal computers, or they could be robots with embedded systems, or a combination of both. Wh

Question 1 Briefly explain main parts of the Camera Question 2 Write a note on: Ripple Edit Tool, Rate Stretch Tool & Track Selection Tool Question 3 What is Pixel

define it #Minimum 100 words accepted#

draw the e r diagram for irctc rail ticket reservation online

describe the two fundament purpose of surveying

ELEMENTS OF PROGRAMMING LANGUAGE:  Learning a programming language requires understanding of concepts such as representation of different types of data in the computer, the va