September 1, 2009
Lecture 2
5
Previous Lecture:
“Computational senses”
Intro to computer programming
CS1112 vs. CS1110
Today’s Lecture:
Anatomy of a program
Variables & assignment
Functions for input & output

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
September 1, 2009
Lecture 2
7
Formula
Surface area of a sphere?

September 1, 2009
Lecture 2
8
Formula
Surface area of a sphere?
2
4
r
A
π
=

This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
September 1, 2009
Lecture 2
9
Formula
Surface area of a sphere?
Have the cosine of some angel
and want cos(
θ
/2)?
2
4
r
A
π
=
[
]
2
,
0
π
θ
∈