Q141
Open questionSelect an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
207
Questions
8/11
Page
Pick an option on a question to see the right answer and solution.
Q141
Open questionSelect an option to see the answer and solution.
Q142
Open question> f <- function(num) {
+ for(i in seq_len(num)) {
+ cat("Hello, world!\n")
+ }
+ }
> f(3)Select an option to see the answer and solution.
Q143
Open questionSelect an option to see the answer and solution.
Q144
Open question> f <- function(x, y) {
+ x^2 + y / z
+ }Select an option to see the answer and solution.
Q145
Open questionfunction(p) {
params[!fixed] <- p
mu <- params[1]
sigma <- params[2]
## Calculate the Normal density
a <- -0.5*length(data)*log(2*pi*sigma^2)
b <- -0.5*sum((data-mu)^2) / (sigma^2)
-(a + b)
}
> ls(environment(nLL))Select an option to see the answer and solution.
Q146
Open questionSelect an option to see the answer and solution.
Q147
Open questionSelect an option to see the answer and solution.
Q148
Open question> g <- function(x) {
+ a <- 3
+ x+a+y
+ ## 'y' is a free variable
+ }
> g(2)Select an option to see the answer and solution.
Q149
Open questionSelect an option to see the answer and solution.
Q150
Open questionSelect an option to see the answer and solution.
Q151
Open questionSelect an option to see the answer and solution.
Q152
Open question> nLL <- make.NegLogLik(normals, c(1, FALSE))
> optimize(nLL, c(1e-6, 10))$minimumSelect an option to see the answer and solution.
Q153
Open questionSelect an option to see the answer and solution.
Q154
Open questionSelect an option to see the answer and solution.
Q155
Open questionSelect an option to see the answer and solution.
Q156
Open questionSelect an option to see the answer and solution.
Q157
Open questionSelect an option to see the answer and solution.
Q158
Open questionSelect an option to see the answer and solution.
Q159
Open questionSelect an option to see the answer and solution.
Q160
Open questionSelect an option to see the answer and solution.