1 / 15

Code for the Cup

Code for the Cup. Starter Activity. OBJECTIVES: Computational thinking and code efficiency. Code a solution to be fit for purpose. Know the importance of code efficiency. Learn to detect and correct errors and refine programs. KEY WORDS. Program: Sequences of instructions for a computer.

dame
Download Presentation

Code for the Cup

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Code for the Cup

  2. Starter Activity

  3. OBJECTIVES: Computational thinking and code efficiency • Code a solution to be fit for purpose. • Know the importance of code efficiency. • Learn to detect and correct errors and refine programs.

  4. KEY WORDS • Program:Sequences of instructions for a computer. • Sequence: Creating a set of instructions to complete a task. • Programming:writing computer code to create a program, to solve a problem. • Efficient: does it solve the problem, making best use of the available resources (eg as quickly as possible/using least space)? • Testing:is used to see how well a program works in meeting the objective. • Statement: The smallest element of a programming language which expresses an action to be carried out.

  5. CODE - Can you get across the start line? • Activity: • Open 'Code for the Cup' game. • Using only 'rotate' and 'sail' can you connect them to get your boat across the start line? NOTE: You can use multiple copies of the sail and rotate blocks to get to the line.

  6. EFFICIENCY – Which is the most efficient code and why? • Discussion: • Efficient – Solves the problem, making best use of the available resources.

  7. EFFICIENCY – Which is the most efficient code and why? Results:

  8. DASHBOARD DATA Countdown to Start Boat Speed Direction of Sail

  9. DEVELOPING - Are you using your zones? • Discussion: • Green - optimum direction, allows you to travel up to 3x the wind speed. • Orange - you will be slower here than in the green zone. • Red - not good - you will lose speed or capsize. CHALLENGE: Modify and run your code - how fast can you get the boat to go?

  10. DEVELOPING - What makes the boat go faster?

  11. DEVELOPING - Can you make your boat go faster? • Activity: • Drag your old code in the waste bin. • Make a new program using the original blocks but this time include the 'engage Foils' block as well. • Challenge: • What is the fastest boat speed you can achieve with your new code? • Can you get your boat over 40 knots? TIP: The Hydrofoils do not work until the boat reaches 18 Knots (KN)

  12. TESTING - Test your model • Activity: • Identify four code changes that you could make to your program to further improve it. • Are your angles making the most efficient use of the "Direction of Sail"?  • When will you engage the foils? • How many turns do you have? • THINK! Too many turns = slow, too few = out of bounds. • Would changing your sail times enable you to reach the start line on 0. • THINK! You might have to increase or decrease sailing time. CHALLENGE: How close to 0.0 seconds can you cross the start line?

  13. PLENARY: How did you do? • The sequence we put the instructions in MATTERS! • There is more than one way to solve the problem, if it works, its right! • When coding for a real-world situation, the task may require a less efficient program to achieve the desired outcome.

  14. Curriculum Links – Key Stage 2 • Pupil should be taught to: • Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts. • Use sequence, selection, and repetition in programs, work with variables and various forms of input and output. • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs.

  15. Curriculum Links – Key Stage 3 • Pupil should be taught to: • Design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems • Understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem • Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures [for example, lists, tables or arrays]; design and develop modular programs that use procedures or functions

More Related