However, I was able to make a permalink for this just now at home:
#CSH305 All About Arguments MrG
show('#1) what does // do?')
def findDiv(x,y):
return x//y
show('#1) findDiv(3,2)=',findDiv(3,2))
show('#1) findDiv(-7,3)=',findDiv(-7,3))
show('')
def findMod(x,y):
return x%y
show('#1) findMod(3,2)=',findMod(3,2))
show('#1) findMod(-7,3)=',findMod(-7,3))
show('')
show('#2) what does / do?')
def findDiv(x,y):
return x/y
show('#2) findDiv(3,2)=',findDiv(3,2))
show('#2) findDiv(-7,3)=',findDiv(-7,3))
show('')
show('#3) find the arithmetic mean')
def findMean(a,b):
return (a+b)/2
show('#3) findMean(5,10)=',findMean(5,10))
show('#3) findMean(5,10)=',findMean(5,10).n())
show('#3) findMean(5,10)=',n(findMean(5,10)))
show('')
show('#4) what does this code do?')
a=1
b=2
def swap(x,y):
temp=x; x=y; y=temp
return [x,y]
show('swap(a,b)=',swap(a,b))
show('a=',a)
show('b=',b)
--
You received this message because you are subscribed to the Google Groups
"sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-cell/fc93a5e4-762a-4f4e-963e-38ae2cea8c9b%40googlegroups.com.