Posts

Showing posts with the label KS3-CS

Control and sequencing

  Control and sequencing is used in all areas of computing including robotics and video games. We build flowcharts and algorithms to form the basis of all software programs. Control technology Control technology is used to: operate systems, eg traffic lights control actions, eg a robot’s movement create video games control manufacturing devices, eg laser cutters Computers follow instructions or sequences programmed into them. A flowchart can be used to help design a sequence. Actions can be ordered, reordered or removed if no longer necessary. Advantages of computer control systems Computers do not need breaks. Computers can repeat actions in an identical way indefinitely. Computers can work in environments that are dangerous for people. Disadvantages of computer control systems A computer is only as good as its  programming  ,which may contain  errors . If a computer is underpowered it might take too long to do something in a time-critical situation. A computer face...

Representing an algorithm: Flowcharts

  Representing an algorithm: Flowcharts A flowchart is a diagram that represents a set of  instructions . Flowcharts normally use standard symbols to represent the different instructions. There are few real rules about the level of detail needed in a flowchart. Sometimes flowcharts are broken down into many steps to provide a lot of detail about exactly what is happening. Sometimes they are simplified so that a number of steps occur in just one step. Flowchart symbols A simple  program  could be created to ask someone their name and age, and to make a comment based on these. This program represented as a flowchart would look like this:

Thinking computationally

  Thinking computationally Thinking computationally is not  programming . It is not even thinking like a computer, as computers do not, and cannot, think. Simply put, programming tells a computer what to do and how to do it.  Computational thinking enables you to work out exactly what to tell the computer to do. For example, if you agree to meet your friends somewhere you have never been before, you would probably plan your route before you step out of your house. You might consider the routes available and which route is ‘best’ - this might be the route that is the shortest, the quickest, or the one which goes past your favourite shop on the way. You'd then follow the step-by-step directions to get there. In this case,  the planning part is like computational thinking,  and  following the directions is like programming. Being able to turn a complex problem into one we can easily understand is a skill that is extremely useful. In fact, it's a skill you alre...

Introduction to computational thinking

Introduction to computational thinking Before computers can be used to solve a problem, the problem itself and the ways in which it could be resolved must be understood. Computational thinking techniques help with these tasks. What is computational thinking? Computers can be used to help us solve problems. However, before a problem can be tackled, the problem itself and the ways in which it could be solved need to be understood. Computational thinking allows us to do this. Computational thinking allows us to take a complex problem, understand what the problem is and develop possible solutions. We can then present these solutions in a way that a computer, a human, or both, can understand. The four cornerstones of computational thinking There are four key techniques (cornerstones) to computational thinking: decomposition  - breaking down a complex problem or system into smaller, more manageable parts pattern recognition  – looking for similarities among and within problems abstr...

Creating a program from an algorithm

  Creating a program from an algorithm Consider this simple problem. A cinema is offering discount tickets to anyone who is under 15. Decomposing this problem, gives this  algorithm : find out how old the person is if the person is younger than 15 then say “You are eligible for a discount ticket.” otherwise, say “You are not eligible for a discount ticket.” In  pseudocode , the algorithm would look like this: OUTPUT "How old are you?" INPUT User inputs their age STORE the user's input in the age variable IF age < 15 THEN OUTPUT "You are eligible for a discount." ELSE OUTPUT "You are not eligible for a discount." To convert the flowchart or pseudocode into a program, look at each individual step, and write an equivalent instruction. Sometimes the steps will not match exactly, but they will be fairly close. In a  flowchart , this algorithm would look like this: Creating the program in Python A  Python  (3.x) program to meet this algorithm would be: ...

Introduction to programming (What is programming?)

  Introduction to programming Programming is writing computer code to create a program, in order to solve a problem. Programs consist of a series of instructions to tell a computer exactly what to do and how to do it. What is programming? Programming  is writing computer code to create a program, to solve a problem.  Programs  are created to implement  algorithms . Algorithms can be represented as  pseudocode  or a  flowchart , and programming is the translation of these into a computer program. To tell a computer to do something, a program must be written to tell it exactly what to do and how to do it. If an algorithm has been designed, the computer program will follow this algorithm, step-by-step, which will tell the computer exactly what it should do. What is a programming language? A  programming language  is an artificial language that a computer understands. The language is made up of series of  statements  that fit toget...