photo cell

i want to use a photo cell as a variable. What do i use for that in code?

The code is pretty much the same - it is the wiring that's important, and the answer depends what sort of "photocell" it is.

It could be a light-dependent resistor (LDR), a photodiode, phototransistor or a photovoltaic.

Check out this page from Adafruit aka Ladyada. It shows you how to wire up the photocell and has examples of code.

http://www.ladyada.net/learn/sensors/cds.html

I thought the "Getting Started with Arduino" kit included a book of the same name, written by Massimo Banzi, and specifically including explanations and diagrams for switches, LEDs, light sensors, etc?

yes a LDR light dependent resistor but what is the code for it ?

Are you saying that Massimo Banzi's explanations in the included book don't have any code? That may be the case...I don't have that book. But I would be surprised.

Assuming you've wired it correctly, just use analogRead() on the pin to which it's connected:

int value = analogRead(0);

what is the code for it ?

Do you mean the device code?
It is usually printed somewhere on the device, or check the parts list.

but what is the code for it

It depends entirely what you want to do with the information it provides.

It is also called a photo-resistor. Check out this tutorial:

http://robot-overlord.blogspot.com/2009/04/how-to-connect-photoresistors-to.html

-Austin