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
Problem 1 Explain the different categories of electronic payment system in detail Listing the types and sub types Explanation Problem 2 We know that there a

Consistency or data in DBMS Consistency - data in DBMS(Database) is accurate in modeling real world, follows integrity constraints User may ensure transaction consistent by itsel

Given the scenario below, construct a conceptual model. The Seville, Spain soccer association is renovating their soccer arena. They are adding luxury boxes that will be offered to

I NEED FLOW CHART ANT DRAWINGS OF BASIC OPERATIONS OF COMPUTER

The primary step is to start the Debug; this step only consists of typing debug [Enter] on the operative system on time. the "a" (assemble) command is used To assemble a program on

Question 1 Explain the various tools used for open source software development Question 2 Discuss the OSS licensing strategies Question 3 Explain the software developmen


Languages The language is a program containing rules and guidelines to help us in making programs. There are various languages like C, Basic, COBOL, PASCAL, FORTRAN etc. Th

function to delete a telephone book record in c programing using struct and objects...?

Question 1 Explain the configuration steps involved in CMOS setup Date and time Error halt Floppy drive A Halt on Hard disk C HDD Delay Keyboard Memory