`[1] TRUE`

# Making choices choice operators (solution)

Exercise

Create the following variables.

```
<- 10.2
w <- 1.3
x <- 2.8
y <- 17.5
z <- c("red", "blue", "green")
colors <- c(45.2, 36.1, 27.8, 81.6, 42.4)
masses <- "attattaggaccaca"
dna1 <- "attattaggaacaca" dna2
```

Use them to print whether or not the following statements are `TRUE`

or `FALSE`

.

`w`

is greater than 10`"green"`

is in`colors`

`x`

is greater than`y`

- Each value in
`masses`

is greater than 40. - 2 *
`x`

+ 0.2 is equal to`y`

`dna1`

is the same as`dna2`

`dna1`

is not the same as`dna2`

`w`

is greater than`x`

, or`y`

is greater than`z`

`x`

times`w`

is between 13.2 and 13.5- Each mass in
`masses`

is between 30 and 50.

Output solution

`w`

is greater than 10

- Is “green” in
`colors`

`[1] TRUE`

`x`

is greater than`y`

`[1] FALSE`

- Each value in
`masses`

is greater than 40.

`[1] TRUE FALSE FALSE TRUE TRUE`

- 2 *
`x`

+ 0.2 is equal to`y`

`[1] FALSE`

`dna1`

is the same as`dna2`

`[1] FALSE`

`dna1`

is not the same as`dna2`

`[1] TRUE`

`w`

is greater than`x`

, or`y`

is greater than`z`

`[1] TRUE`

`x`

times`w`

is between 13.2 and 13.5

`[1] TRUE`

- Each mass in
`masses`

is between 30 and 50.

- Each mass in

`[1] TRUE TRUE FALSE FALSE TRUE`