Fix an error

Report a typo

Generators do not return the entire list at once. Instead, they return a list that you can iterate over one by one. The following function should work as a generator. But there is an incorrect line in it. Fix one wrong line in the function.

def get_square_root():
    for num in range(1, 100):
        if num % 5 == 0:
            sqrt_num = num ** 0.5
            return sqrt_num

You only need to write the correct version of the line in the answer field.

Enter a short text
___

Create a free account to access the full topic