Programming Exercises
This set of exercises is meant to test your knowledge of the concepts covered in block 2 of the course. All questions are Multiple Choice!
Exercise 1
What is the evolutionary path of code, ideally?
Exercise 2
Which of these types of data is persistent?
Exercise 3
Which of these file formats are interoperable?
Exercise 4
Which of these file formats are binary?
Your turn!
Think about what the underlying structure of the non-binary file formats might be.
Exercise 5
What are the good ways to store nested data on disk (in a file)?
Exercise 6
Guess what the following code snippet in Python would return
= [1, 2, 3]
x = x
y 4)
y.append(print(x)
Exercise 7
Guess what the following code snippet in R would return
<- c(1,2,3)
x <- x
y <- c(y,4)
y print(x)
Your turn!
Try to replicate the above behavior of R in Python (the copying of variables). Hint: you can use shallow copies