80 likes | 198 Views
Introduction to Programming with Alice. What is a computer program?. A set of instructions to tell the computer what to do It can be elegant! Not only a way to tell a computer what to do A computer program is a way to tell another human being what you want the computer to do.
E N D
What is a computer program? • A set of instructions to tell the computer what to do • It can be elegant! • Not only a way to tell a computer what to do • A computer program is a way to tell another human being what you want the computer to do CS150
Computer programming • Another way of thinking! • Another way of solving problems CS150
Ideas in Computer programming • List 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
Ideas in Computer programming • Breaking things up into smaller pieces • Problem decomposition • Stepwise refinement • Top-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 result • Questions or Functions • “How much does the baby weigh?”“Put this baby on the scale and tell me how many pounds she weighs.” CS150
Object-oriented programming • We use objects! CS150
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 CS150