Skip to content
if (i%%8) {
    break
  }

paste is used to cocantinate or bring about a separator within a line of code.

# Initialize the speed variable
speed <- 64

# Code the while loop
while(speed>30) {
  print(paste("Slow down!"))
  speed <- speed-7
}

# Print out the speed variable
speed

Adding speed to the print function created an error before I sorted it.

Course Notes

Use this workspace to take notes, store code snippets, or build your own interactive cheatsheet! The datasets used in this course are available in the datasets folder.

# Import any packages you want to use here

Take Notes

Add notes here about the concepts you've learned and code cells with code you want to keep.

Add your notes here

# Add your code snippets here