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
Question 1 Give the classification of Client/Server software architectures Question 2 Explain the characteristics of Leasing Question 3 Write a note on Activator interfa

Assume that s is a string variable  that is supposed to contain a value to be converted to integer. Write a fragment of code that converts the value to integer variable  and displ

Compiled Language:   An additional program called a compiler translates a program written in a programming language; into a new file that does not require any other program to

Library function :   These are the functions supplied with the programming language. The code or definition of library functions does not have to be written in a user program w


Assignment :  It is composed of variable name, an assignment operator of the language and a value or variable or some expression as per composition allowed based on rules defined

THE FIRST GENERATION (1949-1955) The computers in this generation have the following characteristics:     Physically large in size     Inflexible in operations

Working of a Computer Computer may be divided into the following units     Input Unit     Main Memory or Primary Storage Unit     Arithmetic-Logic Unit

Explain how the internet works

concepts and components of computer security