#September 30, 2011
#Python 3.2 code by Carla Fuqua
#purpose: to find a hypotenuse
#again, input not yet learned
#assign arbitrary variables
width=3
length=4
#remember algebra class
#remember syntax for exponents
hyp=(width*width+length*length)**(1/2)
#print results
print (hyp)
#redefine variables as necessary :)
#...
#(basically just code for the Pythagorean Theorem)
Friday, September 30, 2011
Test 0001: reformatting data
#September 30, 2011
#Python 3.2 code by Carla Fuqua
#purpose: reformatting names "from a list"
#input from list not yet learned
#assign arbitrary variables
x="Carla"
y="Fuqua"
#print results; format Last, First
print (y+", "+x)
#continuing with the theory: to display results from an actual list, number each item in the list?
#print (number)
#then print (number+1) over and over
#loops? je ne sais pas!
#Python 3.2 code by Carla Fuqua
#purpose: reformatting names "from a list"
#input from list not yet learned
#assign arbitrary variables
x="Carla"
y="Fuqua"
#print results; format Last, First
print (y+", "+x)
#continuing with the theory: to display results from an actual list, number each item in the list?
#print (number)
#then print (number+1) over and over
#loops? je ne sais pas!
Labels:
python
Subscribe to:
Posts (Atom)