how to assign Values to Variables in python?, Basic Computer Science

Assignment Help:
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

Related Discussions:- how to assign Values to Variables in python?

Explain the probability and non-probability sampling methods, Question 1 W...

Question 1 Write a program to read four floating point numbers and find their sum and average. Question 2 Differentiate string constants and character constants with one exam

Communications programs , Communications Programs : By communications prog...

Communications Programs : By communications programs, we mean those programs which allow a computer to communicate via a transmission cable to another electronic device. Here we d

ASSIGNMENTS, A STAIRCASE LIGHT IS CONTROLLED BY TWO SWITCHES ONE AT THE TOP...

A STAIRCASE LIGHT IS CONTROLLED BY TWO SWITCHES ONE AT THE TOP OF THE STAIRS AND ANOTHER AT THE BOTTOM OF STAIRS

Configuration of a pc, Configuration of a PC: Generally, when you thin...

Configuration of a PC: Generally, when you think of purchasing a Computer, you first try to exactly know what will be the hardware components such as processor, memory etc. of

Wcdma – fdd technology, WCDMA – FDD technology Multiple access technology i...

WCDMA – FDD technology Multiple access technology is wideband CDMA (WCDMA) All cells at same carrier frequency Spreading codes used to separate cells and users Signal bandwidth 3.8

Deadlocks, What is methods For handling Deadlocks?

What is methods For handling Deadlocks?

Classification of computers, Classify computer systems according to capacit...

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative

Peripheral, What is peripheral & non-peripheral device

What is peripheral & non-peripheral device

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd