Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Annotate the Function | Annotations
Mastering Python: Annotations, Errors and Environment
course content

Course Content

Mastering Python: Annotations, Errors and Environment

Challenge: Annotate the Function

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Section 1. Chapter 5
toggle bottom row

Challenge: Annotate the Function

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Section 1. Chapter 5
toggle bottom row

Challenge: Annotate the Function

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Everything was clear?

Task

You have the implemented is_prime() function. Annotate this function:

  1. The function should receive the integer type value.
  2. The function should return the boolean type value.
  3. The function should have a description:
    """This function checks integer number is prime and returns True or False."""

Once you've completed this task, click the button below the code to check your solution.

Section 1. Chapter 5
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt