Lecture11

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

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

View Full Document Right Arrow Icon
Comp 101 - Spring 2008 ! 03/18/08 ! L11 - Computing with Spreadsheets Programming Spreadsheets
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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.
Background image of page 5

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

View Full DocumentRight Arrow Icon
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
Background image of page 6
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
Background image of page 7

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

View Full DocumentRight Arrow Icon
Comp 101 - Spring 2008 ! 03/18/08 ! L11 - Computing with Spreadsheets Result • After Pasting your spreadsheet should look like:
Background image of page 8
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
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/28/2011 for the course COMP 101 taught by Professor Staff during the Spring '08 term at UNC.

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 Right Arrow Icon
Ask a homework question - tutors are online