Help!!! How to apply my created function to another function
On 11/03/19 7:30 AM, djoyceb at gmail.com wrote:
> A = [ 4, 5, 1]
> def displayVector(v) :
> B = buildRandomVector(A)
> def vectorMagnitude(v) :
> tsum = 0
> for i in v:
> tsum = tsum + i**2
> x = math.sqrt(tsum)
> vectorMagnitude(B) ==>>>> this is problem
Perhaps "this..." is not, but is merely where you *notice* a problem?
After defining B, and before assessing its magnitude, try displaying
Does it contain what you expect?