Please send questions to st10@humboldt.edu .
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "copyright", "credits" or "license()" for more information.

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.  This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
    
IDLE 1.2      
>>> food = "spam"
>>> print food
spam

>>> def cube(val):
	temp = val * val * val
	return temp

>>> cube
<function cube at 0x1108170>
>>> cube(4)
64

>>> quarter

Traceback (most recent call last):
  File "<pyshell#9>", line 1, in <module>
    quarter
NameError: name 'quarter' is not defined

>>> import example.py

Traceback (most recent call last):
  File "<pyshell#10>", line 1, in <module>
    import example.py
ImportError: No module named example.py

>>> import sys
>>> sys.path.append("/Users/smtuttle/Humboldt/to-back-up/f06cis180py/180py_lectures/180py_lect02")
>>> import example.py

Traceback (most recent call last):
  File "<pyshell#13>", line 1, in <module>
    import example.py
ImportError: No module named py

>>> import example
>>> quarter

Traceback (most recent call last):
  File "<pyshell#15>", line 1, in <module>
    quarter
NameError: name 'quarter' is not defined

>>> example.quarter
<function quarter at 0x1108af0>

>>> example.quarter(5)
1.25

>>> 3 + 2 * 6
15

>>> 3 + (2 * 6)
15

>>> (3 + 2) * 6
30

>>> type(example)
<type 'module'>

>>> type(example.quarter)
<type 'function'>

>>> type(0)
<type 'int'>

>>> type(0.0)
<type 'float'>

>>> type(4.0e210)
<type 'float'>

>>> type(3+4j)
<type 'complex'>

>>> type("hi")
<type 'str'>

>>> type('hi')
<type 'str'>

>>> type(True)
<type 'bool'>

>>> type(False)
<type 'bool'>

>>> None
>>> type(None)
<type 'NoneType'>

>>> import example
>>> example.greet

Traceback (most recent call last):
  File "<pyshell#34>", line 1, in <module>
    example.greet
AttributeError: 'module' object has no attribute 'greet'

>>> import example1
>>> example1.greet("george")
************************
  george  
------------------------

>>> print example1.greet("george")
************************
  george  
------------------------
None

>>> s1 = "spam eggs sausage and spam"
>>> s2 = "spam eggs sausage and spam"
>>> s1 == s2
True

>>> s1 is s2
False

>>> s3 = "spam"
>>> s4 = "spam"
>>> s3 == s4
True

>>> s3 is s4
True

>>> 3 < 4
True

>>> 3 > 4
False

>>> 3 <= 5
True

>>> 3 != 4
True

>>> 3 <> 4
True

>>> s1 is not s2
True

>>> s1 < s2
False

>>> s3 < s11

Traceback (most recent call last):
  File "<pyshell#53>", line 1, in <module>
    s3 < s11
NameError: name 's11' is not defined

>>> s3 < s1
True

>>> 'a' < 'b'
True

>>> 'aardvark' < 'apple'
True

>>> True and True
True

>>> True or False
True

>>> not True
False

>>> ! True
SyntaxError: invalid syntax

>>> 1 or 2 or 3 or 4 or 5
1

>>> 0 or None or 0.0
0.0

>>> 1 and 2 and 3
3

>>> 1 and 0 and None
0

>>> if 3 < 5:
	print "3 is"
	print "less than 5"
    else:
	    
  File "<pyshell#68>", line 4
    else:
        
^
IndentationError: unindent does not match any outer indentation level

>>> import ex3
>>> ex3.isBig(1005)
1005 IS big!!!

>>> ex3.isBig(1)
1 is NOT big!

>>> if 3 < 5:
	print "hello"
else:
	print "bye"

	
hello

>>> if 3 < 5:
	print "hello"

	
hello

>>> if 3 < 5:
	print "hello"
	   print "oops"
	   
  File "<pyshell#82>", line 3
    print "oops"
   ^
IndentationError: unexpected indent

>>> if 3 < 5:
	print "hello"
else:
	    print "bye"

	    
hello
>>> def lettergrade(grade):
	if grade >= 90:
		return 'A'
	elif grade >= 80:
		return 'B'
	elif grade >= 70:
		return 'C'
	else
	
SyntaxError: invalid syntax
>>> import ex4
>>> ex4.lettergrade(94)
'A'

>>> ex4.lettergrade(87)
'B'

>>> print ex4.lettergrade(70)
C

>>> 'hi' == "hi"
True

>>> 'hi' is "hi"
True

>>> "It's terrific!"
"It's terrific!"

>>> 'ooo"'
'ooo"'

>>> val = 3
>>> while val < 10:
	print val
	val++
	
SyntaxError: invalid syntax

>>> while val < 10:
	print val
	val = val + 1

	
3
4
5
6
7
8
9

>>> for letter in "the rain in spain stays mainly in the plain":
	print letter

	
t
h
e
 
r
a
i
n
 
i
n
 
s
p
a
i
n
 
s
t
a
y
s
 
m
a
i
n
l
y
 
i
n
 
t
h
e
 
p
l
a
i
n
>>>