Python Basics (2015)
Logic in Python
Try and Except
sum = (float(x) + float(y))
return (float(x) + float(y))
type checking. If x or y was a string or array, it couldn't be converted into a float therefore it needs to be handled. Extra... why calculate the sum again when it you've already stored the value?
Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.
I forgot my password