CS1101S

Lecture 2: Elements of Programming

17 August 2012

Martin Henz

Elements of Programming

Elements of Programming

Elements of Programming

Elements of Programming

Elements of Programming

A Function Is A Black Box

Math.floor

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Picture Language

Another nice pattern

	      
repeat_pattern(4, make_cross, rcross_bb)

Picture Language

Picture Language

Picture Language

Picture Language

Reflection

Missions

JFDI Academy has two missions and one side-quest:

Still awake?

	      
function mystery(x) {
    return x * mystery(x - 1);
}

mystery(5)

What is the result?

/

#