120 likes | 173 Vues
Computer Programming. Previous Experience. I have never seen a computer program I have seen some code, but never written any I have written some basic code in one language I have written several programs in more than one language Which number describes you best?.
E N D
Previous Experience • I have never seen a computer program • I have seen some code, but never written any • I have written some basic code in one language • I have written several programs in more than one language Which number describes you best?
What is computer programming? • Can you give a definition of a computer program? • Do you need to have done it before? • Do you have to be “good at computers”? • “If computing is the study of computers, then astronomy is the study of telescopes and chemistry is the study of test tubes.”
My definition • A computer program is a sequence of instructions in a limited language that when executed in the correct order accomplishes a specific task on a computer. • Can you give some examples of computer programs?
First steps… • What is Logo? • Open up FMS Logo • We will start with three commands only • fdn • Move forward n pixels • rtn • Right turn n degrees • cs • Clear the screen • Practice using these commands to draw a square, rectangle, and triangle
Math in Logo • * is times • / is divide • + is plus • - is minus • 3 ** 4 is three to the power four • sqrt(25) is square root
Shapes to create ? Pentagon Hexagon N-agon House Castle
Difficulties • What if you want to execute the same instructions over and over? • What if you want to save your shapes so you can use them next time? • We will find solutions to these problems in the coming weeks
Recap • A computer program is a sequence of instructions in a limited language that when executed in the correct order accomplish a specific on a computer • Concepts: • Looping • Code reuse • Syntax • This course is more about problem-solving, than computers • You need to find your own level, and try to learn something new or practice something you’ve learned, every lesson • Don't compare yourself with other students in the class!