Multiple Choice Quiz.pdf
Document Details
Uploaded by ConsummateBougainvillea
Tags
Full Transcript
Multiple Choice Quiz: Debugging If Loops in R Question 1: Incorrect Comparison Operator Question: What is wrong with the following R code that checks if a number is equal to 5? A) The comparison operator should be = instead of ==. B) The comparison operator should be == instead of =...
Multiple Choice Quiz: Debugging If Loops in R Question 1: Incorrect Comparison Operator Question: What is wrong with the following R code that checks if a number is equal to 5? A) The comparison operator should be = instead of ==. B) The comparison operator should be == instead of =. C) The variable num should be a string. D) The print statement should be outside the if-else block. Answer: B) The comparison operator should be == instead of =.