CS1501. What is a computer program? A set of instructions to tell the computer what to do It can be...
-
Upload
mitchell-french -
Category
Documents
-
view
213 -
download
0
Transcript of CS1501. What is a computer program? A set of instructions to tell the computer what to do It can be...
CS150 1
Introduction to Programming with Alice
CS150 2
What is a computer program?A set of instructions to tell the computer
what to doIt can be elegant!
Not only a way to tell a computer what to doA computer program is a way to tell another
human being what you want the computer to do
CS150 3
Computer programmingAnother way of thinking!Another way of solving problems
CS150 4
Ideas in Computer programmingList of instructions, or Sequential processing
“Beat eggs, mix in flour, sugar and shortening, pour into baking pan, then bake at 375 degrees for 45 minutes.”
Ifs“If it is raining, take an umbrella”
Repeating behavior“While there are cookies in the plate keep
eating cookies”“Stomp your foot for five times”
CS150 5
Ideas in Computer programmingBreaking things up into smaller pieces
Problem decompositionStepwise refinementTop-down design“The way we are going to clean the house is to first
clean the kitchen, then clean the bathroom, then clean each of the bedrooms one at a time”
Compute a resultQuestions or Functions“How much does the baby weigh?”
“Put this baby on the scale and tell me how many pounds she weighs.”
CS150 6
Object-oriented programmingWe use objects!
CS150 7
What is Alice?Alice in wonderland is a tribute to a
mathematician, Lewis Carroll… That taught math in a very simple way using
fairy tales.Learning to program will be easier than you
think