I Exam

Last updated: 2020-08-12 00:41:58

I.1 Course grade

  • Exercises (50%)
  • Exam (50%)
    • The exam is composed of 20 multiple-choice questions. There is exactly one right answer to each question.
    • Exam duration is 3 hours.
    • Permitted exam equipment: a calculator.
    • The exam takes place in a regular class, with pen and paper (not in front of a computer).
    • Each question gives a short code section. The code section is not identical to the ones that appeared in the course materials, but they combine functions and methods which were learned. You need to choose the right code output out of 4 options.

I.2 Material for exam

The material for the exam is Chapters 110, except for:

  • Dates (Date)

I.3 Examples of exam questions

I.3.1 Question 1

What will be the output of the following code section?

() [1] NA NA NA

() [1] 3 2 4

() [1] NA -2 8

() [1] NA -1 2

I.3.2 Question 2

What will be the output of the following code section?

() [1] 1 2

() [1] 2 1

() [1] 1 1

() [1] 2

I.3.3 Question 3

What will be the output of the following code section?

() [1] 1 2 1 2

() [1] 1 2 3 4

() [1] 1 2

() [1] 1 4 1 4

I.3.4 Question 4

What will be the output of the following code section?

() [1] FALSE

() [1] TRUE TRUE TRUE

() [1] TRUE FALSE

() [1] TRUE

I.3.5 Question 5

What will be the output of the following code section?

() [1] FALSE FALSE FALSE FALSE

() [1] TRUE FALSE FALSE FALSE

() [1] TRUE TRUE FALSE FALSE

() [1] TRUE TRUE TRUE FALSE

I.3.7 Question 6

What will be the output of the following code section?

() [1] 0 3

() [1] 1 3

() [1] 0 2

() [1] 1 2

I.3.8 Question 7

What will be the output of the following code section?

() [1] 1.222222

() [1] 1.444444

() [1] 1.888888

() [1] 1

I.3.9 Question 8

What will be the output of the following code section?

() [1] 1

() [1] 56

() [1] 8

() [1] 101

I.3.10 Question 9

What will be the output of the following code section?

() [1] NA

() [1] 1

() [1] 2

() [1] 3

I.3.12 Question 10

What will be the output of the following code section?

() [1] 0

() [1] 1

() [1] 2

() [1] 3

I.3.13 Question 11

What will be the output of the following code section?

() [1] "cat cat" "sparrow cat" "turtle cat"

() [1] "sparrow sparrow"

() [1] "sparrow"

() [1] "sparrow cat"

I.3.14 Question 12

What will be the output of the following code section?

() [1] 1

() [1] 2

() [1] 5

() [1] 6

I.3.15 Question 13

What will be the output of the following code section?

() [1] FALSE

() [1] TRUE

() [1] TRUE TRUE TRUE

() [1] FALSE FALSE FALSE

I.3.17 Question 14

What will be the output of the following code section?

() [1] 2 4 1

() [1] 8 6 5

() [1] 2 4 6

() [1] 62 105 175

I.3.18 Question 15

What will be the output of the following code section?

() [1] 2 4 8

() [1] 8

() [1] 4

() [1] 4 8

I.3.19 Data for questions 16-17

For questions 14-15 we will define a matrix named m:

I.3.20 Question 16

What will be the output of the following code section?

() [1] 6 6 6

() [1] 1 1 1

() [1] 1 2 3

() [1] 2 2 2

I.3.21 Question 17

What will be the output of the following code section?

() [1] 31

() [1] 29

() [1] 28

() [1] 33