you get a domain error if you try to square root a negative number, so this needs to be caught first
It is "+1" at the end because the slice operator (:) does not include the last position. So if you print(s[0:1]) it would only print the character at position 0.
Loading collection data...
you get a domain error if you try to square root a negative number, so this needs to be caught first
It is "+1" at the end because the slice operator (:) does not include the last position. So if you print(s[0:1]) it would only print the character at position 0.