Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, September 4, 2019

Codecademy Learn R Logical Operators 9/12


#Sample Solution
---
title: "Introduction to R Syntax"
output: html_notebook
---
```{r}

message <- 'Should I pack an umbrella?'
weather <- 'cloudy'
high_chance_of_rain <- TRUE
if(weather == 'cloudy' & high_chance_of_rain){
  message <- "Pack umbrella!"
} else {
  message <- "No need for umbrella!"
}
print(message) #Pack umbrella!
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts