Description
Material covered
- Reading from a file
- for loops
- Processing data in a file with split
- Building lists
Notes
You must save all your code as a script (use the interactive console to test your expressions, but save them in a file).
Grading
Total marks is 2.
You will receive 1 mark for attendence only if you stay until the end. You will either receive 0 or 1 mark for attendence. You will get 1 mark for successful completion of exercise 1.
You will have to demonstrate your program to the teaching assistant. Use only what have been taught in class or described in this lab.
Exercises
Exercise 1: Summation of numbers
Open the file lab5.csv
. This file has a number in every alternate line.
Now write a python program that calculates the summation of all the numbers. This is the same question you have in the midterm