Boston Python Workshop 8/Data types: Difference between revisions

no edit summary
imported>Jesstess
(Created page with "__NOTOC__ ==Numbers: integers and floats== * Integers don't have a decimal place. * Floats have a decimal place. * Math mostly works the way it does on a calculator, and you...")
 
imported>Jesstess
No edit summary
 
Line 67:
 
<pre>
>>> print ("Hello" + "World")
HelloWorld
</pre>
Line 73:
<pre>
>>> name = "Jessica"
>>> print ("Hello " + name)
Hello Jessica
</pre>
 
<pre>
>>> print ("""In 2009,
... The monetary component of the Nobel Prize
... was US $1.4 million.""")
In 2009,
The monetary component of the Nobel Prize
Line 135:
temperature = 32
if temperature > 60 and temperature < 75:
print ("It's nice and cozy in here!")
else:
print ("Too extreme for me.")
</pre>
 
Line 304:
>>> your_dict.get("Eve")
>>> person = your_dict.get("Eve")
>>> print (person)
None
>>> print (type(person))
<type 'NoneType'>
>>> your_dict.get("Alice")
Anonymous user