Posts

Showing posts with the label Computer Science

What is an algorithm?

Algorithms An algorithm is a plan, a set of step-by-step instructions to resolve a problem. In an algorithm, each instruction is identified and the order in which they should be carried out is planned. What is an algorithm? Algorithms are one of the four cornerstones of Computer Science.  An algorithm is a plan, a set of step-by-step instructions to solve a problem.  If you can tie shoelaces, make a cup of tea, get dressed or prepare a meal then you already know how to follow an algorithm. In an algorithm, each  instruction  is identified and the order in which they should be carried out is planned. Algorithms are often used as a starting point for creating a computer program, and they are sometimes written as a  flowchart  or in  pseudocode . If we want to tell a computer to do something, we have to write a computer program that will tell the computer, step-by-step, exactly what we want it to do and how we want it to do it.  This step-by-step pro...

Microsoft Excel Simple Formulas

Image
  Introduction One of the most powerful features in Excel is the ability to calculate numerical information using formulas . Just like a calculator, Excel can add, subtract, multiply, and divide. In this lesson, we'll show you how to use cell references to create simple formulas. Mathematical operators Excel uses standard operators for formulas, such as a plus sign for addition ( + ), a minus sign for subtraction ( - ), an asterisk for multiplication ( * ), a forward slash for division ( / ), and a caret ( ^ ) for exponents. All formulas in Excel must begin with an equals sign ( = ). This is because the cell contains, or is equal to, the formula and the value it calculates. Understanding cell references While you can create simple formulas in Excel manually (for example, =2+2 or =5*5 ), most of the time you will use cell addresses to create a formula. This is known as making a cell reference . Using cell references will ensure that your formulas are always accurate because ...

What is decomposition?

Image
  What is decomposition? When we solve computer programming problems we need to make choices about what to do and what order to do them in. Sometimes the problem is so big or complex that we don’t know where to start. Decomposition is when we break a problem down into smaller parts to make it easier to tackle. You break down problems all the time to help you solve them.  Imagine you want to organise all your DVDs alphabetically and you have a lot of them! Where would you start? Chances are you already know the answer. You might decompose the task into the following steps: Organising DVDs Take all the DVDs off your shelf. Sort the DVDs into piles based on the first letter of the title. Start with the 'A' pile. Organise this group into alphabetical order by second and third letters. Place them on the shelf. Repeat for the rest of the alphabet. Find out more about breaking down problems and decomposition. How computer programmers use decomposition Computer programmers do exactly ...

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...