{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture11

# Lecture11 - Programming Spreadsheets Comp 101 Spring 2008...

This preview shows pages 1–10. Sign up to view the full content.

Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Programming Spreadsheets

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets The Original PC “Killer App” The application that legitimized the PC as an office tool was the spreadsheet . Previously, PC were used primarily by hobbyists. Inspired by an accountant’s ledger metaphor But, it is much more… an alternative method of programming a computer Data is stored in cells of a table Computations are specified implicitly using formulas that relate table cells
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Let’s get Started… You’ll need a standard spreadsheet to do the next few in-class exercises One alternative is to use Microsoft Excel or iWork Numbers Otherwise you can use the following free one http://spreadsheet.google.com need to create a “gmail” account

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Basic Spreadsheet Layout • Letter-labeled columns • Number-labeled rows Matrix or grid of cells Cells contain data – Strings – Numbers – Computations
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets A Useful Example In cell “A2” enter a “1” In cell “A3” enter “=A2+1” Copy the contents of A3 to cells A4-A25 Type the Label “N” into cell “A1” Now add labels “64N”, “4N^2”, “16NlogN”,”2^N”, and “(2N+2)(2N-1)” to cells B1-F1 respectively.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Example Continued Next we will fill cells of our spreadsheet with computations Select cell “B2” (you’ll need to double click on it in most cases) and type the formula “=64*A2” Alternative ways of entering formulas Instead of typing “A2” as in the example above, you could instead “reference” it by typing “=64*” and then selecting (single-clicking on) the desired cell Continue with formulas for elements is row 2
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Copying Cells After you have entered formulas for row 2, copy that row to rows 3- 25. This can be done by selecting cells B2-F2, copying it using on of Press “Ctrl-C” on a PC of “command-C” on a Mac Right-clicking (Ctrl-click on a Mac) and choosing “copy” Selecting “copy” from the edit menu Paste these contents to rows 3-25 “Ctrl-V” (PC) or “command-V” Mac “Paste” on either “right-click” or “Ctrl-click” context menus Paste from the “edit” menu Many ways to do the same thing

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Result After Pasting your spreadsheet should look like:
Comp 101 - Spring 2008 03/18/08 L11 - Computing with Spreadsheets Closer Inspection Now select one of the cells you pasted (e.g. B4) Notice the formula is not exactly as you typed By default references to cells are relative to the current cell.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 36

Lecture11 - Programming Spreadsheets Comp 101 Spring 2008...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online