R_Code-10.r (403B)
1 # Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 20 Mar 2026 2 # Repo: https://github.com/notamitgamer/bsc 3 # License: MIT 4 5 # Create a numeric vector of student exam scores. 6 # Write a single line of code that evaluates these scores and 7 # outputs "Pass" for any score 50 or above, and "Fail" for any score below 50. 8 9 score <- c(45, 26, 89, 21, 75, 99, 13, 68, 85) 10 11 ifelse(score < 50, "Fail", "Pass")