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
Data Input : There are several aspects of data input that need careful consideration. We shall assume that in a laboratory environment you are mainly concerned with entering data

QUESTION (a) Consider the graph below, use the Flow Decomposition technique to list the cycles and paths produced.                                                (b) Pr

Consider the state transition diagram of Figure 3.9b. Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/Su

File Organization There are three types of file organization used in practice. Let us consider the example of a dictionary. The dictionary contains listing of English wo

Question Write the steps for applying animations. Prepare a presentation of 5 slides in a creative for any topic in your semester (research methods/Business strategy/Financial

what is computer mapped input / output

solve three given number in ascending order through algorithm

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

File Sharing Architecture:   The development of microprocessor, PC and LAN transformed dumb terminals into -smart? clients. This brought a complete change in the computing env

Control Unit of the processor: The  Control Unit  of the processor is that unit which controls and coordinates the execution of instructions by the processor. It is responsibl