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
1. The standard way for debuggers to plant breakpoints in a program in RAM (whatever the processor instruction set) is to save the breakpointed instruction and replace it by a jump

A Doctor Module Doctor has a list of the patients waiting for consultation. The doctor's module should include all the following details: Fields for common complaint

Number data types store numeric values. They are an immutable data type, which means that changing the value of a number data type results in a newly allocated object. Number objec

Why is it called out of band protocol? A1) FTP uses port 20 and port 21; port 20 is used for data connection, whereas port 21 is used for control connection. FTP is known as out-of

Question: Imagine that you are part of a design team creating a new mobile phone for people such as "Angel White" whose persona is given below: Angel is turning 90 years old

Question 1: a) A distinction is often made between computer architecture and computer organisation. Describe, using examples, the meaning of computer architecture. b) Name

Hi there, I''m just asking that do you do data mining assignment?

Editor and Assembler:   To write a program in any of the programming languages requires an editor.  This is  a program that is used to create text files. While saving the p

write a function named "location_of_largest"that takes as its arguments the following:(1) an array of integer values

what is the difference between internet and world wide web?