Table-1 Exercises

< CS101

For these exercises, you write code to print some rows from a table. All of the problems here use the baby-2010.csv data as in lecture. Recall that the fields in the baby data are: "name", "rank", "gender", "year".

1.

Write code to print the row for the name "Atticus"


table-1-ex1

2.

Write code to print the rows for the name "River". In this case, there are two such rows, but the same basic code pattern as for question 1 works. This shows how the loop really is just testing every row.


table-1-ex2

3.

Write code to print the rows where the rank is less than 10 (i.e. <).


table-1-ex3

4.

Write code to print the rows where the rank is greater than 950.


table-1-ex4


Each click of a Run button saves that code to disk on the computer running the browser. The button below retrieves the code exercises listed to the right of the button.

count 4 : table-1-ex1 table-1-ex2 table-1-ex3 table-1-ex4

(code appears here)