Use of cookies

We use cookies to improve and analyse your browsing experience on our web. You can accept these cookies, reject them or choose your settings by clicking on the corresponding buttons. Please note that rejecting cookies may affect your browsing experience. For more information you can consult our Cookies policy.

Configure cookies

Cookies are an essential part of how our web works. The main goal of cookies is to make your browsing experience more comfortable and efficient and to improve our services and the web itself.
Here you can find all the information about the cookies we use and you can activate and/or deactivate them according to your preferences, except for those cookies that are strictly necessary for the operation of the web. Blocking some cookies may affect your experience on the web and how the site works. For more information you can visit our Cookie Policy.

Strictly necessary (technical) cookies

These Cookies are necessary for the web to function and cannot be disabled on our systems. They are generally only set up in response to actions you may take such as requesting services, setting your privacy preferences, logging in or completing forms. You can set your browser to block or warn you about these cookies, but some parts of the web will not work. Information about Cookies.

Analytical cookies

These Cookies allow us to count the number of visits and traffic sources so that we can measure and improve the performance of our site. They help us to find out which pages are the most popular and least popular, and to see how visitors move around the web. All information collected by these Cookies is aggregated and therefore anonymous. If you do not allow these Cookies we will not know when you visited our web. Information about Cookies.

Third party cookies

These cookies are used to analyse your activity in order to show you personalised advertisements. Information about Cookies.

Accept Decline Configure cookies Confirm selected

tester
Search
×
Notes
Search
There are no notes
  • Digital book > Unit 1. Using algorithms to analyse and solve problems
  • To customise Pencil press Alt + Down Arrow
  • To customise Highlighter press Alt + Down Arrow

    Change theme

    Error - please check your internet connection...
    Back

    Blink Help

    x
    Error - please check your internet connection...

    How can we help you?

    No results

    View full manual

    Couldn't find what you were looking for?

    Please describe the issue you are experiencing and provide as many details as possible. Let us know the book, class, access device, licence code, username, used browser or if it occcurs in our app:

    Thickness:
    Font size:
    Filter
      No resources found
      Revision mode

      Revision mode

      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P

      1. The project approach: a technological algorithm
      2. Algorithms. Graphical representation
      3. Sequential algorithms
      4. Selective algorithms
      5. Iterative algorithms

       An algorithm is a finite and orderly set of operations that we can use to find the solution to a problem.

      Last year, we studied the project approach that we use as technologists. This approach is a series of ten ordered steps that we work through to meet one of society's needs. Therefore, the project approach is an algorithm.

      Algorithms can be represented graphically by charts or diagrams. They can also be programmed with programming languages so that we can solve them using software tools.

      In this unit, we will use Scratch to represent and programme small algorithms to solve day-to-day problems.

      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      0

      Read and listen to the text on the previous page and then answer these questions in your notebook:

      1. Indicate whether the following statements are true or false:
      • Algorithms are finite and orderly sets of operations that help us to find solutions to problems.

      • Correct answer
        Wrong answer
      • The project approach is not an algorithm because it is a series of ten steps in no set order.

      • Correct answer
        Wrong answer
      • We can represent algorithms using charts and diagrams.

      • Correct answer
        Wrong answer

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1. What are the three most important words in the text? Use a dictionary to find out their meaning.

      1. In your own words, explain what you understand by computer program.

      Find out what you already know by answering these questions in your notebook:

      1.  Think about all the activities you do to prepare for an exam. Write them down in order in your notebook and describe what might happen if you miss out any of the activities.

      1.  If you are sick and go to the doctor, what steps does the doctor take to make you better? In your notebook, write down what happened the last time that you went to the doctor and what the doctor did.

      1.  Write a list of all the sections of the project report. Why do you think that a project report contains all of these sections?

      1.  Write down all the steps that you would use to build a wooden bird house. Arrange the steps in order.

      1.  Imagine that you need to cut out the pieces for the bird house in the last question and you do not know if you have enough wood. What steps would you follow to solve this problem?

      1.  An abacus is a device used since ancient times to do mathematical calculations using algorithms. Do an online search for information about early abacuses and how they were used to add up. Summarise this information briefly in your notebook.

      1.  Do an online search about Zeller’s congruence and explain in your notebook what the algorithm is used for and who developed it. Why is it considered to be an algorithm?

      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Learn

      1. The project approach: a technological algorithm

      Throughout history, humans have faced problems that they have had to resolve in order to carry on evolving. When these problems were addressed without evaluating the pros and cons, the solution did not generally produce the expected result.

      In ancient times, early mathematicians and philosophers used different algorithms to find the solution to problems (algorithms for adding and subtracting, calculating astronomical distances, calculating physical quantities, etc).

      An algorithm is a series of instructions or ordered steps for performing an activity or resolving a problem.

      In technology, we find solutions to problems using a working method that we saw last year: the project approach.

      The project approach is a method of dealing with and resolving the practical problems affecting any society. It consists of ten stages and we can study it as an algorithm.

      Algorithms have the following characteristics:

      • They contain specific instructions so there is no ambiguity.
      • They must end; in other words, they are finite.
      • All their steps are simple and ordered.

      All of the algorithms developed nowadays can be solved using computers and programming languages.

      A program is the translation of an algorithm into a programming language that can be understood and processed by a computer.

      Last year, you learnt to solve problems by working through the phases of the project approach. This year, you will learn to use algorithms to solve day-to-day problems.

      By using Scratch as the programming language, you will also be able to code algorithms in small programs that will give you the solution to these problems.

       

       

       

       

      KEYWORDS   

      Make sure you understand these words before moving on!

      • Algorithm: a series of instructions or ordered steps for performing an activity or resolving a problem.
      • Project approach: a method of dealing with and resolving the practical problems affecting any society.
      • Program: the translation of an algorithm into a programming language that can be understood and processed by a computer.

       

      EXERCISES

      1.  Before you walk across a street, you check whether the traffic light says that you can cross and whether there are any vehicles heading in your direction. Is this set of actions an algorithm? Why?

      Phases of the project approach

      1. Detect the problem or need. What do we need? What problem do we have or what task have we been set? What conditions are there? If we are very clear about the problem we need to resolve and we know all the details, the rest of the process will be easier.
      2. Information and research. We collate, study and select information on the different ways that we could resolve the problem. We also study products that meet similar needs.
      3. Search for possible solutions. We think of the different options, i.e. different objects or products that could resolve our problem. We study and assess each option to see if it is viable.
      4. Choose the solution. We choose the best solution based on the criteria that we set as priorities (type of material, size, shape, cost, etc.) and after analysing the advantages and disadvantages of each solution.
      5. Design. We do drawings (sketches) and diagrams or plans of our chosen solution. We can do these freehand first and add more detail later, but we must make sure that the product is aesthetically pleasing.
      6. Prepare and plan the work. We choose the materials, techniques and tools that we are going to need. We split the work up into small tasks and decide how long we need to spend on each operation. We then share out the work and put the blocks of work in order.
      7. Build the product. This is the stage where we build, assemble and finish the parts and assemble the object. At this stage, we need to put our new theoretical knowledge to work and use the tools and materials we chose earlier. We also need to remember to economise on materials.
      8. Check the results. At this stage, we check that the product works and that it does what we want it to do. We evaluate the aesthetics (appearance) of the product and, if necessary, we propose changes and improvements.
      9. Presentation and assessment. We present our work and have it assessed by people outside the group.
      10. Write the project report.

       

       

       

      All the stages of the project approach are connected. Often, we must return to a previous stage to reconsider our hypotheses, develop new ideas, redesign earlier ones, etc.

      Technology products are always being reviewed and re-analysed. By doing this, we can improve and upgrade them.

      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Learn

      2. Algorithms. Graphical representation

      Diagrams and charts can give us a general idea of ​​what we are dealing with. We create diagrams of the main ideas in a topic or use symbols like traffic lights because they give us clear indications without having to read long paragraphs of text.

      The algorithms we use to solve problems can also be represented graphically to give us a general idea of the steps that we need to take.

      The chart used to represent algorithms is called a flowchart or flow diagram and uses symbols connected by arrows to show the sequence of the actions.

      The symbols used in flowcharts are:

      • Terminal: represents the beginning or end of the development of an algorithm.
      • Process: used to represent each of the actions needed to develop the algorithm.
      • Information input or output: used when information is needed (additional data to develop the algorithm) or when we present data or results.
      • Decision: used when we need to decide between two or more options. It indicates the path to follow depending on the chosen option.
      • Flow line: tells us the order of the actions in the algorithm.

      For example, the flowchart on the left shows the algorithm for multiplying two numbers a and b provided that they are greater than 0.

      1. Start the program.
      2. Enter the value of a and b.
      3. Check that they are both greater than 0.
      4. If they are not, start again.
      5. If they are, perform the operation.
      6. End the program.

       

       

      KEYWORDS   

      Make sure you understand these words before moving on!

      • Flowchart: diagram that graphically represents the instructions of a programmed activity.
      • Sequential algorithm: an algorithm whose instructions are executed one after the other in the same order as they appear.
      • Selective algorithm: the execution of the instructions in this algorithm depends on whether or not a condition is met.
      • Iterative algorithm: an algorithm whose instructions are repeated several times.

       

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Learn

      3. Sequential algorithms

      The basic structure used to solve a problem is the sequential structure. Here, the instructions of the algorithm are executed one after the other in the same order as they appear.

      Imagine that you are in Technology class. What steps should you take to pass your Technology exam?

      Following the logical order, the tasks that you need to complete are:

      1. Go to class.
      2. Listen to the teacher's explanations.
      3. Ask questions about concepts that you do not understand.
      4. Go home and study the concepts that you have learned about in class.
      5. Do the exam.

      We have to do these activities in order. There is no point in trying to do the exam before we have studied for it, or to study the subject without listening to the teacher's explanations.

      The instructions in points 1 to 5 are a sequential algorithm that we can represent with the following flowchart:

       
      For enquiring minds!

      A sequence is a series or succession of related things. We can apply this definition to very diverse fields, including biology (to define the amino acid sequences of an organism, for example) and film (to define the series of scenes that deal with a particular part of the plot, for example).

       

      Growth sequence.

       

       
      Pause and reflect!

      Algorithms can be coded in programming languages ​​so that we can solve them using computers. Flowcharts are used to help develop this code.

      We can use the flowchart to check for and eliminate any duplications and errors in the algorithm.

      EXERCISES

      1.  Create a sequential algorithm for some of the things that you do every morning: eat breakfast, have a wash, go to class, etc.

      1.  Draw the flowchart for the algorithm that you created in the last question.
      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Learn

      4. Selective algorithms

      Selective (or conditional) algorithms have a series of instructions that are executed depending on whether or not a condition is met.

       Imagine that you have passed your Technology exam. However, to pass the whole course you need a pass for your workshop activity too.

      Therefore, you need to calculate the average mark for your exam and your workshop activity. If your average mark is 5 or above, you have passed the course; if it is lower, you have failed.

      As you can see, the algorithm for this situation includes the condition that your average mark must be 5 or over to execute an instruction; otherwise, a different instruction is executed. Therefore, it is a selective algorithm. 
      The flowchart for this algorithm is:                

       

       

      First of all, it checks the condition that the average mark is 5 or over and then makes a decision based on whether or not this condition is met.

      To make programs in Scratch using these algorithms, we use the blocks if ... then and if ... then / else

        

       
      For enquiring minds!

      Conditional instructions can be used to nest several conditions. We could have included conditions for passing the exam. For example, your workshop mark has to be higher than 3 and the average of your exam mark and your workshop mark must be higher than 5.
      To code this type of instruction in Scratch, we use these operators.

       

       

                              

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Learn

      5. Iterative algorithms

      Iterative (or repeating) algorithms have a set of instructions that are repeated several times. These instructions are contained in loops that mark the beginning and end of the repetition.

      Imagine that you could repeat your Technology exam and workshop activity as often as you needed to obtain an average mark of 5 or more.

      In this case, the algorithm flowchart would be:

       
      Pause and reflect!

      Our day-to-day tasks have the structure of an iterative algorithm because we repeat them every day: eat, have a wash, go to bed, etc.

       

       
      For enquiring minds!

      In Scratch, loops or repetitions are coded with the instructions repeat ..., forever and repeat until ....

      With the first one, repeat ..., we can select the number of times that a series of instructions is executed; forever means that the loop never ends and the instructions will repeat themselves indefinitely, and repeat until ... lets us include a condition that pauses the loop when it is reached.

       

      This time, we check the condition that the average mark is 5 or more. If this condition is not met, the diagram tells us that we must repeat the exam and/or workshop activity.

      The instructions in iterative algorithms can repeat themselves a limited number of times, repeat themselves forever or repeat themselves until one or more conditions are met.

      EXERCISES

      1.  Invent a selective algorithm and draw the flowchart that represents it.

      1. Invent an iterative algorithm and draw the flowchart that represents it.

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      Practical 1. Let me introduce myself! 

      You can do Practical 1 by following the book or by listening to the instructions.

      In this practical, we are going to solve a problem that we face at the start of every year: introducing ourselves to our classmates and teachers. This time, we can do it in an original way using a computer and one or more of the algorithms we have studied.

      Exercise 1. Analysis

      We are going to do our introduction using a sprite and a backdrop from Scratch. The sprite will be the Starfish from the Animals category and the backdrop will be beach malibu. You can find these in the sprites and backdrops libraries, respectively.

      First of all, think of four aspects to define the sprite: name and age, favourite colour, likes and hobbies, favourite music, etc. We have called our sprite Balubita. She is 150 years old, her favourite colour is blue and her favourite music is hip hop.

      Exercise 2. Design

      Now we need to design our introduction. Should we develop the project sequentially? Will we need to repeat an instruction? Will a condition need to be met to activate any movement, music or sound effects? Will the character move?

      When she introduces herself, Balubita will tell us her name, age and favourite colour sequentially. She wants to turn blue when she tells us what colour she is and she wants to move along the beach. Balubita will then ask us to click on her to play her favourite music.

      Exercise 3. Flowchart

      The flowchart in the margin indicates the order of the instructions. It is an algorithm that combines sequential and iterative structures.

      Exercise 4. Programming in Scratch

      Now code the presentation in Scratch programming language following the flowchart.

      1. Go to http://scratch.mit.edu and click on Create. Start a new project by going to File / New and name it Unit01_P1_A_namesurname.
      2. Select the correct sprite and backdrop.
      3. Start coding with the instruction when green flag clicked and include the instructions one by one.
      4. Use the say ... for instruction from the Looks category to add each message and choose a duration of 2 seconds for each.
      5. To change the colour of the sprite, add the instruction set color effect to ... and type 150 to turn it blue.
      6. Then nest the instruction glide 1 secs to x: 150 and: -50, from the Motion category.
      7. In a separate program, include the instruction when this sprite clicked from the Events category.
      8. After this instruction, nest the order play sound ..., from the Sound category and select hip hop (you will find this sound in the Scratch sound library). This will give you two programs that look like the ones on the right:

      Name Balubita
      Age 150
      Favourite colour Blue
      Favourite music Hip-hop

      Exercise 5. Improve the introduction

      If you look at the flowchart you will see that it is possible to improve this program. As you can see, the last part includes the condition that the music only plays if we click on the sprite.

      1. Delete the program that runs when the sprite is clicked.
      2. In the program that you did not delete, nest the order wait until ... from the Control category and add the touching mouse-pointer? instruction from the Sensing category to it. This tells the sprite that it must wait until we click on it.
      3. Now nest the instruction if ... then from the Control category and add the instruction touching mouse-pointer? from the Sensing category to it.
      4. Lastly, nest in the loop if ... then the instruction play sound hip hop from the Sound category.
      5. Test the result by clicking on the green flag.

         

      1. The sprite should end up at the position x = 150, y = -50 and turn blue. To stop this from happening and to make the program start with the sprite in its starting position with its initial conditions, we usually include starting conditions at the beginning of the program. To do this, below the instruction when green flag clicked, add the instruction clear graphic effects from the Looks category and the instruction go to x: -200 y: -50, from the Motion category. Now, every time we restart the program, the sprite will be at these coordinates and in its original colour.
      2. Save the program with the name Unit01_P1_B_namesurname.sb2.
      3. Modify the program to introduce yourself. You can include a photo of yourself as the sprite and a place that you like as the background.
      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      Practical 2. Acne! What a drag!

      At your age, you are probably already familiar with the dreaded acne, those spots that appear on your face and are so difficult to get rid of. You will have been told that they will disappear as you get older but what are you supposed to do in the meantime? The answer is simple: eat well, be scrupulous about washing your face and see a doctor if the problem is severe.

      In this practical, we analyse the problem of acne and give an appropriate solution for it using algorithms. We will also use Scratch to code the algorithms.

      Exercise 1. Analysis

      Look at your own skin and the skin of your classmates. Some will probably have acne and others will not; some will only have a few spots while others will have more. Because of these differences, the treatment will be different in each case.

      Exercise 2. Design

      The possible situations and their treatments are:

      • Students with no acne. We need to stop it from appearing: they must eat properly and not consume too much fat or sugar.
      • Students with just a few spots. They simply need to eat properly and wash their face and hands carefully to stop the spots from spreading to other areas.
      • Students with severe acne. Besides eating properly and taking good care of their skin, they should go to a dermatologist who will recommend a corrective treatment for the problem.

      Exercise 3. Flowchart

      The flowchart in the margin indicates the order of the instructions. We will repeat the algorithm for every student in the class.

      Exercise 4. Programming in Scratch

      We will now code the acne problem in Scratch programming language following the flowchart.

      1. Start a new project by going to File / New. Name it Unit01_P2_namesurname.
      2. Select Avery as the sprite and select chalkboard as the backdrop.
      3. Start coding with the instruction when green flag clicked and add the instructions one by one.
      4. The program will analyse each of the students in your class. Include the instruction repeat ... and indicate how many students are in your class. We used twenty in our example.
      5. Nest the instruction say Hi! I'm going to solve your problem for 2 secs from the Looks category.
      6. The sprite then asks you your name so include the instruction ask What's your name? and wait from the Sensing category.
      7. Nest the instructions say Hello! for 1 secs and say answer for 1 secs from the Looks category. Note! You will find answer in the Sensing category. The program uses it to store the name typed when it asks you your name.
      8. According to the flowchart, the next question is if you have acne. To do this, nest the instruction ask Do you have acne? and wait from the Sensing category. The program should look like the one in Figure 1.
      9. According to the flowchart, we must now use a selection structure to analyse the answers. Nest the loop if ... then / else from the Control category.
      10. In the condition of this instruction, we must see if the answer is "Yes"” because we then have to find out if the acne is severe. To do this, nest the condition using the equality comparator from the Operators category. Figure 2 shows how to do this.
      Fig.2
      1. In the loop if ... then, nest the instruction ask Is it severe? and wait from the Operators category.
      2. The instructions for curing the acne will depend on the answer to this question so nest another conditional loop to check whether the answer is "Yes"” or "No"”. Include the if ... then / else loop and code the condition like you did in point 10 (see Figure 3).
      3. Now nest the instructions of the recommendations for severe acne using the instruction say from the Looks category.
      4. Nest the different instructions (for acne that is not severe and for students that do not have acne) underneath each else. Use the say instruction from the Looks category.
      5. Test the program. Download the project Unit01_P2_namesurname.sb2 to your computer by going to File / Download to your computer and selecting the folder where you save your work.

      Note!

      The last instruction of the program is wait 1 secs from the Control category. This instruction means that the repetitions are not instant; instead, one second passes between each student evaluation.

      Fig. 1

       

      Fig.3

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      Practical 3. Money management

      Another problem that people your age often have is money. It would be very useful to have a small monthly calculator that tells you how much money you have left in your savings, based on your income and expenses.

      In this practical, you will learn to develop the algorithms you need to code your monthly calculator in Scratch.

      Exercise 1. Analysis

      The problem is to create a calculator that subtracts the expenses that you enter each day and adds up any income you have. To stop you from running out of money, it will also warn you when you have 50 euros or less in your piggy bank. When you have more than 50 euros, the calculator will send you a message of encouragement to continue saving.

      Exercise 2. Design

      To create this calculator, you need to work with variables. We need three variables here: income, expenses and the money left in your piggy bank.

      You will use sequential, selective and iterative algorithms.

      Exercise 3. Flowchart

      The flowchart in the margin indicates the order of the instructions. The algorithms will be repeated 30 times, one for each day of the month (we consider that there are 30 days in a month).

      Exercise 4. Programming in Scratch

      We will now code the calculator in Scratch programming language using the flowchart as a guide.

      1. Start a new project by going to File / New. Name it Unit01_P3_namesurname.
      2. First of all, define the variables to use. Go to the Data block and select Make a variable. Create the piggy bank contents, expenses and income variables.

      1. Start the program with the instruction when green flag clicked.
      2. To set the starting value of the variables, assume that you start off with a piggy bank containing 150 euros. Select the instructions set piggy bank contents to 150, set income to 0 and set spending to 0 from the Data category.
      3. We will now repeat all the instructions for the 30 days of our calculation. We will use an iterative instruction for this. Select the repeat 30 block from the Control category.
      4. Now nest the instruction ask Have you had any income? and wait from the Sensing block.
      5. To answer this question, we need to include a selective block so nest the loop if ... then / else from the Control category.
      6. The condition to test is whether the answer to the last question is "Yes"” or "No"”. To do this, use an equality comparator from the Operators category. You can see this in Figure 4.
      7. If the answer is "Yes”" you need to know how much income you had, so include the instruction ask How much? and wait from the Sensing category.
      8. Now nest the instruction change income by answer from the Data category. This will increase the value of the income variable by the value you enter as income each time.
      9. Nest the instruction set piggy bank contents to piggy bank contents + answer from the Data category. To code this instruction you need an addition operator from the Operators category and the value of answer from the Sensing category. See Figure 5.
      10. If the answer to the question "Have you had any income"” (point 6) was "No"”, you now need to know if there have been any expenses: in the block if ... then / else, under the else branch, nest the instruction ask Have you had any expenses? and wait from the Sensing category.
      11. Nest the block if ... then to check the answer like you did in point 7 and include the instruction ask How much? and wait from the Sensing block. Nest the instructions to change the values ​​of the expenses and piggy bank contents variables. These steps are similar to the ones for the instructions in points 9 and 10. See Figure 6.
      Fig.6
      1. Now, outside the block if ... then / else, include an instruction for the character to tell you the contents of your piggy bank. Use the instruction say from the Looks category and the instruction join from the Operators category. It should look like this (Figure 7):
      Fig.7
      1. To finish off, we just need to find out if the piggy bank contains more than 50 euros. Use a new if ... then / else block and the instructions say You are doing well for 2 secs and say You need to start saving for 2 secs from the Looks block; depending on how much money is in the piggy bank, the calculator will say one thing or the other.
      2. The program should look like the one in Figure 8.
      3. Test the program. Download the project Unit01_P3_namesurname.sb2 to your computer by going to File / Download to your computer and selecting the folder where you save your work.

       

      Fig.4
      Fig.5

       

       

       

      Fig.8
      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      Practical 4. Other programming languages

      The algorithms in this unit can be used to code programs in different programming languages.

      The previous practicals used Scratch. In this practical, you will learn to use other interesting programming languages ​​that are also visual and based on blocks, just like Scratch.

      Exercise 1. Bitbloq 2

      Bitbloq 2 is a programming language developed by a Spanish company called BQ. It can be used to programme Arduino controller boards. These boards are used to create prototypes and control sensors and actuators with programs.

      We are not going to make a program in this exercise because we would need to connect a controller board and the sensors or actuators that we want to control to operate it. Instead, we are simply going to learn the Bitbloq 2 language and find out about its different options and programming instructions.

      1. Open Bitbloq 2: type http://bitbloq.bq.com in your Chrome browser and click on Pruébalo ahora. You do not need to sign up but Bitbloq 2 can only be used online. Any projects that you do will be saved to the cloud; you can download and import them any time.
      2. Go to Placas in the right margin (Figure 9) and drag the Zum board to the centre of the screen. You can connect three types of boards with this program: Arduino, Zum and Freaduino. Zum is the proprietary board of BQ.
      3. In the Componentes section, choose an LED and connect it to pin 8 of the board (Figure 10).
      4. Click on the Software icon to the left of the screen (Figure 11). The different categories are displayed in the panel on the right.
      5. Each category contains a series of instructions that can be joined together to create the program. Select the Componentes category and drag the instruction Encender el LED ... to the main loop. Now stack the instruction Esperar 2000 ms from the Control category.
      6. This way, when a board is connected, the LED will light up for 2,000 milliseconds.
      7. Take a screenshot of the program by pressing the Impr pant key on your computer keyboard. Paste the screenshot in a text document. Save the program with the name Unit01_P4_A_namesurname.

      Exercise 2. Visualino

      Visualino is a multi-language, open source and cross-platform programming language for Arduino controller boards. The main difference with Bitbloq 2 is that it does not need an Internet connection.

      Before you download Visualino, you must download the Arduino IDE. You can do this at the official website: www.arduino.cc. It is available for various operating systems in the Download section.

      1. Now install Visualino: go to www.visualino.net and click on Download. Install the program by selecting the visualino.exe file.
      2. Click on Preferences in the top toolbar.
      3. The left panel displays all the programming categories in different colours. The right panel shows the code translated for Arduino. We can add instructions to the central panel by dragging them from the edge.
      4. We are going to create a program to turn on an LED using the controller board. An LED is a small light bulb that is widely used in electronics. It can be controlled by Arduino boards.
      5. Click on the Pin functions category and select DigitalWrite PIN# ... state HIGH (Figure 14). Drag the instruction to the central panel of Visualino and nest the instruction in Setup (Figure 15).
      6. In the Math category, choose the block with the number 0, change 0 for 12 and nest this block behind PIN# in the last sentence (Figure 15). This instruction indicates that you have connected the LED to pin 12 of the controller board; the value HIGH indicates that it is on.
      7. Now click on the Control category and select the instruction Wait (ms) .... Nest a number block from the Math category in it and change the value 0 to 500. This instruction indicates that the LED will light up for 500 milliseconds.
      8. Repeat the last two instructions by right-clicking on them and choosing the Duplicate option (Figure 16). Nest them in Setup.
      9. Change the value HIGH in the third instruction to LOW. This switches the LED off. Figure 17 shows the end result.
      10. You are only seeing how Visualino works now. You cannot see the effect because you have not connected an Arduino board. When you connect a controller board, you will see that the program switches on an LED for 500 ms and then switches it off again.
      11. If you copy these instructions in Loop, the instructions will repeat themselves indefinitely and the LED will flash on and off constantly.
      12. Take a screenshot of the program by pressing the Impr pant key on your computer keyboard. Paste the screenshot in a text document. Save the program with the name Unit01_P4_B_namesurname.
      Fig.9

       

      Fig.10

       

      Fig.11

       

      Fig.12

       

       

      Fig.13
       
      Fig.14

       

      Fig.15

       

      Fig.16
       
      Fig.17
      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Review

      Unit summary

      • An algorithm is a series of instructions or ordered steps for performing an activity or resolving a problem.
      • The project approach is a method of dealing with and resolving the practical problems affecting any society. It consists of ten stages and we can study it as an algorithm.

      • A program is the translation of an algorithm into a programming language that can be understood and processed by a computer.
      • The chart used to represent algorithms is called a flowchart or flow diagram and uses symbols connected by arrows to show the sequence of the actions.
      • The main symbols of a flowchart are:

      • There are three types of algorithms:
      • Sequential algorithms. Algorithms whose instructions are executed one after the other in the same order as they appear.
      • Selective (or conditional) algorithms. Algorithms with a series of instructions that are executed depending on whether or not a condition is met.
      • Iterative (or repeating) algorithms. Algorithms that have a set of instructions that are repeated several times. These instructions are contained in loops that mark the beginning and end of the repetition.
      • Algorithms can be used in programming languages for efficient coding. In this unit, we studied Scratch, Bitbloq 2 and Visualino.
      • Scratch is a free graphical programming environment that we can use to express our ideas creatively and develop logical thinking skills.
      • Bitbloq 2 is a programming language developed by a Spanish company called BQ. It can be used to programme Arduino controller boards.
      • Visualino is a multi-language, open source and cross-platform programming language for Arduino controller boards.
      • Is the problem solved?

      Express yourself!  

      At the end of the book, on page 170 you will find the definitions of the keywords with examples of how to use them. You can also expand your vocabulary and learn new idiomatic expressions and language structures related to this topic

      KEYWORDS

      algorithm iterative algorithm project approach sequential algorithm
      flowchart program selective algorithm  

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      Communication Corner. Let's create our technologist blog

      You must have permission from your parents or legal guardians to do this practical. Remember also to read all the terms of the service carefully.

      For technologists, it is very important to find the answers to problems, but we also need to tell society about the solutions we find. This communication was slow in the past, but now we can use new technologies and the Internet to send information almost instantly all over the world.

      Create your own technologist blog where you can record your progress, discoveries and other interesting information. We recommend the Blogger tool for this.

      1. Go to www.blogger.com.
      2. You can create a blog by going to your Gmail account and entering your details. If you do not have a Gmail account, click on Crear cuenta to create a Gmail account or associate the blog to an email account from another server (like Yahoo! or Hotmail).
      3. Enter the name that you will use to sign off your posts. You can use your own name or something else. Click on Continuar en Blogger.
      4. Click on Nuevo blog. Type "Communication Corner”" as the title of the blog and use your name and surname as the URL. This URL is what other users will type to go to your blog (first check that the combination of your name and surname is free). Now click on Continuar.
      5. Select a template that you like and click on Crear blog.
      6. Start posting entries. An entry is an article, video or account published on a blog that may or may not have comments. Entries are also called posts. All posts are generally sorted by their publication date.
      7. Click on Entrada nueva. Type "Algorithms"” as the title of this new post.
      8. Type the body of your post in the main box. You could write a summary of the algorithms we have seen in this unit.
      9. Use the toolbar options to format the text (change the colour, size and font).
      10. Click on the Vista previa button to see how the text looks as you write it.

      1. Lastly, click on Publicar.
      2. To share your blog, copy the address you see in the browser and paste it into an e-mail. You can also use the Compartir option to publish your post on sites like Twitter, Facebook, etc.
      3. Use the buttons on the toolbar to insert images, videos and links.

      Challenges

      Challenge 1. Add another page to your blog and call it “Images”. Write this as an introduction: “I will include some of my favourite technology images on this page”. Take a screenshot of this page of your blog and paste it in a text document. Save the file with the name Unit01_namesurname_challenge1.stl.

       

       

       

       

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      Activities

      COMPREHENSION ACTIVITIES

      When you have completed the topic, do the following exercises in your notebook:

      1.  Describe the stages of the project approach.

      1.  Draw the algorithm for the last question.

      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  What is an algorithm?
      QW4gYWxnb3JpdGhtIGlzIGEgc2VyaWVzIG9mIGluc3RydWN0aW9ucyBvciBvcmRlcmVkIHN0ZXBzIGZvciBwZXJmb3JtaW5nIGFuIGFjdGl2aXR5IG9yIHJlc29sdmluZyBhIHByb2JsZW0u

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  What is a flowchart? What are the main symbols of a flowchart?
      IFRoZSBjaGFydCB1c2VkIHRvIHJlcHJlc2VudCBhbGdvcml0aG1zIGlzIGNhbGxlZCBhIGZsb3djaGFydCBvciBmbG93IGRpYWdyYW0gYW5kIHVzZXMgc3ltYm9scyBjb25uZWN0ZWQgYnkgYXJyb3dzIHRvIHNob3cgdGhlIHNlcXVlbmNlIG9mIHRoZSBhY3Rpb25zLg==

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  What is a sequential algorithm? Give two examples of situations that can develop sequentially.
      IEluIGEgc2VxdWVudGlhbCBhbGdvcml0aG0sIHRoZSBpbnN0cnVjdGlvbnMgYXJlIGV4ZWN1dGVkIG9uZSBhZnRlciB0aGUgb3RoZXIgaW4gdGhlIHNhbWUgb3JkZXIgYXMgdGhleSBhcHBlYXIuPGJyIC8+DQpFYWNoIHN0dWRlbnQgd2lsbCBnaXZlIGRpZmZlcmVudCBleGFtcGxlcy4gRXhhbXBsZXMgb2YgYSBzZXF1ZW50aWFsIHN0cnVjdHVyZSBtaWdodCBiZTogZm9sbG93aW5nIHRoZSBzdGVwcyBpbiBhIHJlY2lwZSwgZm9sbG93aW5nIHRoZSBpbnN0cnVjdGlvbnMgdG8gcmVnaXN0ZXIgb24gYSBzb2NpYWwgbmV0d29yaywgZXRjLiZuYnNwOw==

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  What is an iterative algorithm? Give two examples of situations that can develop iteratively.
      IEl0ZXJhdGl2ZSAob3IgcmVwZWF0aW5nKSBhbGdvcml0aG1zIGhhdmUgYSBzZXQgb2YgaW5zdHJ1Y3Rpb25zIHRoYXQgYXJlIHJlcGVhdGVkIHNldmVyYWwgdGltZXMuIFRoZXNlIGluc3RydWN0aW9ucyBhcmUgY29udGFpbmVkIGluIGxvb3BzIHRoYXQgbWFyayB0aGUgYmVnaW5uaW5nIGFuZCBlbmQgb2YgdGhlIHJlcGV0aXRpb24uPGJyIC8+DQpFYWNoIHN0dWRlbnQgd2lsbCBnaXZlIGRpZmZlcmVudCBleGFtcGxlcy4gSXRlcmF0aXZlIGFsZ29yaXRobXMgYXJlIHVzZWQgaW4gbWF0aGVtYXRpY2FsIG9wZXJhdGlvbnM6IGFkZGluZywgc3VidHJhY3RpbmcsIG11bHRpcGx5aW5nIGFuZCBkaXZpZGluZy4mbmJzcDs=

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  What is a selective algorithm? Give two examples of situations that can develop selectively
      IFNlbGVjdGl2ZSAob3IgY29uZGl0aW9uYWwpIGFsZ29yaXRobXMgaGF2ZSBhIHNlcmllcyBvZiBpbnN0cnVjdGlvbnMgdGhhdCBhcmUgZXhlY3V0ZWQgZGVwZW5kaW5nIG9uIHdoZXRoZXIgb3Igbm90IGEgY29uZGl0aW9uIGlzIG1ldC48YnIgLz4NCkVhY2ggc3R1ZGVudCB3aWxsIGdpdmUgZGlmZmVyZW50IGV4YW1wbGVzLiBBbiBleGFtcGxlIG9mIGEgc2VsZWN0aXZlIHNpdHVhdGlvbiBjb3VsZCBiZSB0aGF0IHlvdXIgcGFyZW50cyBvbmx5IGxldCB5b3UgZ28gb3V0IGlmIHlvdSBnZXQgZ29vZCBtYXJrcyBvciB3aGVyZSB5b3UgY2FuIG9ubHkgYnV5IGEgbmV3IHQtc2hpcnQgaWYgeW91IGhhdmUgZW5vdWdoIG1vbmV5LiZuYnNwOw==

        1 attempt
      Done
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P
      1.  Draw the two flowcharts for the situations described in Exercise 5.
      2.  Draw the two flowcharts for the situations described in Exercise 6.
      3.  Draw the two flowcharts for the situations described in Exercise 7.
      4.  Explain what the following programs are, what they do or how they work:

      a)

       

      b)

      1.  You will now hear some of the keywords from page 26. Write them down and then check to see whether you have spelled them correctly.
      2.  Get into pairs and explain to your partner what flowcharts are and what the symbols used in the diagram are.

      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P

      EXTEND YOUR KNOWLEDGE

      1.  Draw the flowchart for the programs in the last question. List the algorithms that you can see in each flowchart.
      2.  Draw the flowchart for an algorithm that calculates your average mark in three Technology tests. If the average mark is 5 or above, the program must tell you that you passed. If the average mark is lower than 5, it must tell you that you failed.
      3.  Use Scratch to code the algorithm in the last question and check that it works.
      4.  Draw the flowcharts of the following Scratch programs:

      a)

      b)

      1.  Based on Practical 2 of this unit, use Scratch to code a diagnostic program that tells you if you are eating properly. If you drink sugary soft drinks every day, it must tell you that you are exceeding the recommended amount of sugar. If you do not eat fruit and vegetables every day, it must tell you to increase the amount of fruit and vegetables in your diet. If you do not drink sugary soft drinks and usually eat fruit and vegetables every day, the program should congratulate you. You will now hear some of the keywords from page 26. Write them down and then check to see whether you have spelled them correctly.

      1.  Explain what types of algorithms you used in the program for the last question and what category they belong to.

      1.  Compose five sentences about analysing and solving problems with algorithms using the following expressions: “To create/invent/write a sequential, selective or iterative algorithm”, “To use Scratch/Visualino/Bitbloq 2 to programme an algorithm”, “To draw a flowchart or flow diagram to help us create an algorithm”. Practise them in pairs.

      1.  Get into small groups and think of different situations where you could use these expressions: “out of order”, “to keep (somebody) in the loop”, “out of condition”.

      1. Do an online search for information about ABN calculation algorithms. Briefly describe what these algorithms are and what they are used for.

      1. Rubik’s cube is a very famous algorithm. Do an online search for information about it and answer the following questions in your notebook:

      a. Who invented the Rubik's cube?

      b. What are Rubik's Revenge and the Professor's Cube?

      c. What is the Fridrich method? d. What is the record for solving the Rubik's Cube?

      1. Do an online search for information about the following algorithms and write down what they are for in your notebook: MP3, PageRank, Auto-Tune and CRUSH.

      1 Using algorithms to analyse and solve problems
      1 Using algorithms to analyse and solve problems
      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

      1 Using algorithms to analyse and solve problems

      P

      In the computer room

      MULTIMEDIA ACTIVITIES

       1. Algorithms test

      Open exercise Unit01 01 Unit test in Unit 1 of the virtual CD and test your knowledge. There is only one correct answer to each question. Keep repeating the test until you score at least 80%.

      2. Vocabulary

      Open exercise Unit01 02 Vocabulary in Unit 1 of the virtual CD. This exercise contains important words from this unit and their meanings.

      Match them up correctly. Keep repeating the exercise until you have matched them all up correctly.

       

      3. Working pairs

      Open exercise Unit01 03 Matching pairs in Unit 1 of the virtual CD.

      Match each symbol to its definition. Keep repeating the exercise until you have matched them all up correctly.

       

      4. True or false?

      Open exercise Unit01 04 True or false? in Unit 1 of the virtual CD.

      Indicate whether the statements are true or false. Keep repeating the test until you score at least 80%.

       

       5. Program effects

      Open exercise Unit01 05 Program Effects in Unit 1 of the virtual CD.

      Match each program to the effect that it produces. Keep repeating the exercise until you have matched them all up correctly.

       

      Digital book
      Unit 1. Using algorithms to analyse and solve problems
      Without background sound
      Logo

       

      P

      ONLINE ACTIVITIES  

       1. The Euclidean algorithm

      1. Do an online search for information about one of the most famous algorithms of all time: the Euclidean algorithm.
      2. Start your word processor to create a new blank document and answer the following questions in it:
      1. What is the Euclidean algorithm used for?
      2. From which historical figure does it take its name? Write a brief biography of this figure.
      3. Why do we say that it is an algorithm?
      1. Save the file with the name Unit01_Internet1_namesurname.

       2. The sieve of Eratosthenes

      1. Another well-known algorithm is the sieve of Eratosthenes. Do an online search for information about it and answer the following questions in a text document:
      1. What is the sieve of Eratosthenes used for?
      2. Who was Eratosthenes? When did he live?
      3. What other discoveries are thought to be the work of Eratosthenes?
      4. Give the names of two other algorithms and write a short description of each.
      1. Save the file with the name Unit01_Internet2_namesurname.

       3. Google Blockly. The maze

      Blockly is a visual programming language developed by Google that uses instructions nested in blocks, similar to Scratch.

      1. Go to http://blockly-games.appspot.com/maze and discover the Blockly maze.
      2. Select English in the top bar and start nesting the instructions needed to make the character reach the end. There are ten levels and the instructions get more and more complicated as you go along.
      3. Take a screenshot by pressing Impr pant on your computer keyboard to save the image of the last level you were able to reach without help. Paste the screenshot in a text document.
      4. Save the file with the name Unit01_Internet3_namesurname.

       Useful addresses

      • www.alice.org/index.php Alice is a free software programming language that shows us how to solve problems with 3D models.
      • http://hourofcode.com/en Hour of Code is a website about programming with tutorials. It is designed for children, young people and adults.
      • www.actiludis.com Website with information about ABN calculation algorithms based on numbers to teach younger students how to calculate.

       

      1 Using algorithms to analyse and solve problems
      1. 1
      2. 2
      3. 3
      4. 4
      5. 5
      6. 6
      7. 7
      8. 8
      9. 9
      10. 10
      11. 11
      12. 12
      13. 13
      14. 14
        Eraser
        Rich text editor
        Editor toolbarsBasic Styles Bold Italic Underline Strikethrough Transform Text Switcher Text Color Background Color Subscript SuperscriptParagraph Insert/Remove Numbered List Insert/Remove Bulleted List Decrease Indent Increase IndentLine spacingLine spacingparagraph2 Align Left Center Align Right JustifyInsert Link Table Insert Special CharacterStylesFontFontSizeSize

        Press ALT 0 for help
        Back to top
        close