CS 105

Week 7

Midterm 1

Multiple Choice Average: 74%

Free Response Average: Abysmal

Midterm 1

File Extensions

Every file on a computer is just 0 and 1s.

File extensions tell us how to interpret the 0s and 1s.

The file extension refers to the part of the file that appears after the dot:

mp1.zip -- zip file
midterm.pdf -- pdf flie
tictactoe.html -- html file
game.js -- javascirpt (js) file
pic.jpeg -- image (jpeg) file

Types of Files

We can divide up every file extension into two classes of files:


text files can be opened and read with just a plain text editor (Notepad++, TextWrangler, etc)

Exmaples: js, html, csv, xml, txt


binary files are encoded and requires a special-purpose program to open

Exmaples: jpeg, png, zip, pptx, docx, xlsx

Data Formats

There are two common, near-universal formats for data:

csv, comma separated values (text file)
xlsx, excel (binary file)

CSV File

A comma separated values file is a text file with the extension csv.


Each line represents a row of data.

Within each line, values are separated by commas.

"MSFT",42.36
"AAPL",126.60
"GOOG",567.68

Excel File

Excel files (xls, xlsx) are spreadsheets.

Spreadsheets

Spreadsheets organize data into 2D grids, with the ability to add formulas, styles, graphs, and other features.


Excel is not the only spreadsheet tool:

Google Docs
Numbers (Mac)
...hundreds others...

Excel

Lets work with our first Excel spreadsheet!