R_Code-10.r (277B)
1 # Create a numeric vector of student exam scores. 2 # Write a single line of code that evaluates these scores and 3 # outputs "Pass" for any score 50 or above, and "Fail" for any score below 50. 4 5 score <- c(45, 26, 89, 21, 75, 99, 13, 68, 85) 6 7 ifelse(score < 50, "Fail", "Pass")