NEW
Font size
WorksheetsDay-3 Assessment(Essentials of Data Analytics Using R)
Total questions: 15
Worksheet time: 8mins
Point out the correct statement?
Blocks are evaluated until a new line is entered after the closing brace
Single statements are evaluated when a new line is typed at the start of the syntactically complete statement
The if/else statement conditionally evaluates two statements
Break will execute a loop while a condition is true
Which of the following R syntax is correct for while loop?
while ( statement1 ) statement2
while ( statement1 ) else statement2
while ( statement1 ) do statement2
while ( statement2 ) doelse statement2
Point out the wrong statement?
for will execute a loop a fixed number of times
break will execute a loop while a condition is true
if and else tests a condition and acting on it
break is used to break the execution of a loop
Which loop executes a sequence of statements multiple times and abbreviates the code that manages the loop variable?
repeat
for
while
do-while
Which of the following true about for loop?
Repeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body.
it tests the condition at the end of the loop body.
Both A and B
None of the above
Which statement simulates the behavior of R switch?
Next
Previous
break
goto
Which of the following character skip during execution?
D
C
A
B
What will be output for the following code?
A
ABC
ABCD
AA
What will be output for the following code?
A
NAN
NA
Error
getwd() is used
to see current directory
to set current directory
to change current directory
not a R command
library(datasets) is used
to load external datasets
to load builtin datasets
Error
Wrong
?datasetName is used
to take help, more info about datasetName
to take remove datasetName
to load datasetName
can't use in R
which is not a type of functon in R?
infix
primitive
replaceement
external
ifelse(T==TRUE, "I knew it!", "Yes")
I knew it!
Yes
Not a valid statement
Error
if else(T==TRUE, "I knew it!", "Yes")
I knew it!
Yes
"I knew it!"
Error
