Lab exercise 1
Starting from this week, there will be weekly lab exercises you need to complete and submit. Answer the questions using R Markdown and upload your knitted pdf file on Moodle by 23:59pm of the lab day.
- Write a for loop to calculate the sum of 1, 2, …, 10
hint:
create an initial object
y = 0
at each iteration, add something to
y