# Exercise: Using Conditions on Arrays

In this exercise, you will be using multiple conditions on arrays.

## We'll cover the following

# Task

In this exercise, you will be using conditions on NumPy arrays.

## Problem statement

- Create an array for variable
`x`

consisting of $20$ values from $0$ to $2\pi$. - Compute $sin(x)$ and store it in a variable
`y`

. - Store all values of
`y`

that are greater than $0.7$ or less than $-0.5$ in one array.

$y>0.7, \space y<-0.5$

- Store all values of
`y`

that are greater than $-0.5$ and less than $0.7$ in another array.

$-0.5<y<0.7$

$\pi$ can be accessed using

`np.pi`

.

$sin(x)$ can be used as

`np.sin(x)`

.

Get hands-on with 1200+ tech skills courses.