Download presentation
Presentation is loading. Please wait.
Published byTamsyn Wright Modified over 9 years ago
1
Introduction to Computer Programming Computer Programming I Introduction to Aerospace Created by The North Carolina School of Science and Math.The North Carolina School of Science and Math Copyright 2012. North Carolina Department of Public Instruction.North Carolina Department of Public Instruction Created by The North Carolina School of Science and Math.The North Carolina School of Science and Math Copyright 2012. North Carolina Department of Public Instruction.North Carolina Department of Public Instruction
2
What is a computer? What is a computer? Break into groups and come up with 10 answers to each of these questions. What do computers do? How do we use them? Compare the answers in class Summarize the answers
3
What is a computer? Using a laptop computer as an example What are the parts of a laptop computer?
4
CPU What is a computer? Using a laptop computer as an example What are the parts of a laptop computer? Screen Keyboard CPU Ports Mouse/ Trackpad Interface Hardware Hard DriveRAM
5
What is a computer program? A set of instructions for a computer to perform a specific task. Computers don’t speak English or any other human language, they speak in binary code. 01010110101010111110101011010101010111100010010 All ones and zeros Called machine code Computer languages translate commands into machine code Computer languages C, C++, Ada, Fortran, COBOL, PL/1, Java, Pascal, BASIC, Perl, Python, Prolog are different computer languages
6
What is an algorithm? A step by step procedure for performing an action, like a calculation or for a computer program. When writing a computer program, an algorithm is used to outline what you want the computer to do. Can be represented by a flow chart. A Linear algorithm is the simplest Linear means in a line Start – Perform Actions – Stop
7
Algorithm components Terminator Block Start Stop Process Block Decision Block Start Stop Open Book Want to Read? Read Book to End Yes No Close Book
8
Linear algorithms Now, work in groups to create the flow chart for an algorithm about getting up in the morning. End the algorithm when you leave the house for school. Start when you wake up. Don’t use decision blocks at first. Share the algorithms with the class.
9
Linear algorithms After completing the linear algorithm example for waking up, take one aspect of your algorithm and introduce a decision block. Must be a simple decision of two different options Redraw the flow chart with the decision block included. How many other decision blocks could you add to the waking up algorithm?
10
Algorithm Exercise Create your own algorithm for something you do that is linear. Use as many decision blocks as you can.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.