Hey i dont under stand funtion imports


What do I have to do because I don't understand at all what's happening


Please post a link to the exercise so we can have a look. Thanks.


I think he might have an issue with the import of the square portion of math. I'm having trouble getting it to work myself


The sqrt function is imported from math, as follows:

from math import sqrt

Now in our code we will write,

y = sqrt(x)

where x is the parameter of the function, and y is the return value.

def sigma(sigma_squared):
    return sqrt(sigma_squared)


thank but I figured it out but I need help with this list and slicing
suitcase = ["sunglasses", "hat", "passport", "laptop", "suit", "shoes"]

first = suitcase[0:2] # The first and second items (index zero and one)
middle = suitcase[2:4] # Third and fourth items (index two and three)
last = suitcase[5:6] # The last two items (index four and five)


Not sure how this relates to the opening topic. We could still use a link to the lesson, please.

Your slices look correct. Is there an error message?

last = suitcase[4:]


Oops, try again. It looks like your last slice is ["suit"] instead of ["suit", "shoes"].


oh I got thank you but it had 0-5 and the last two were 4-5


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.