1 ©2006 INSciTE Problem Solving. 2 ©2006 INSciTE Generic Problem Solving Process Define the problem Brainstorm solutions Evaluate solutions Pick one Try.

Slides:



Advertisements
Similar presentations
Measuring Techniques How to Measure Accurately Mrs. Woodward- Bingham HS.
Advertisements

1 ©2006 INSciTE Lab One Task: Move forward for 5 rotations and return Then try: Move forward for 5 rotations, turn right 90º.
C.E.I.P. El Peñascal -Segovia - February 12, 2002.
Introduction to Programming
How to Make a Peanut Butter and Jelly Sandwich Mrs. Broesamle and Mrs. Pelkey.
Problem Solving: Algorithms and Flowcharts By Dr. Gabriel.
Chapter 1 - An Introduction to Computers and Problem Solving
Chapter 2 - Problem Solving
Chapter 2 - Problem Solving
Some Recipes Spaghetti alla carbona… Pancake… Borsch… Breaded Escalope Struffoli Napoletani… Piadina… Crepes…
Computer Science 101 Overview of Algorithms. Example: Make Pancakes Prepare batter Beat 2 eggs Add 1 tablespoon of brown sugar Add 1 cup of milk Add 2.
Programming Concepts (Part A) Ping Hsu. What is a program? WHITE CAKE RECIPE 1.Preheat oven to 350 degrees F (175 degrees C). 2.Grease and flour a 9x9.
Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
By James Creamer Cupcake Recipe. Ingredients 2 1/4 cups all purpose flour 1 1/3 cups sugar 3 teaspoons baking powder 1/2 teaspoon salt 1/2 cup shortening.
1 Chapter 8 Designing Small Programs. 2 A ‘Procedure’ v A set of instructions which describe the steps to be followed in order to carry out an activity.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
FLL Programming 101 NxtPL May 2006 Version 1.0. Legal Stuff © 2006 INSciTE in agreement with, and permission from FIRST and the LEGO Group. This document.
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Algorithm. An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
Original Source : and Problem and Problem Solving.ppt.
Measuring Techniques How to Measure Accurately Mrs. Shelton.
 200g plain flour  2 tbsp full-fat milk  2 whole free-range eggs  A mixing bowl  A whisk  A frying pan  A small amount of butter.
How to make a pancake By Sophie Draper. Ingredients: Frying pan Large Mixing Bowl Long handled spatula Mixing Spoon 2 Eggs 2 cups of flour 2 ¾ cups of.
By A Group Making pancakes a visual diary. Firstly we had to find a recipe for pancakes. We searched on Google and found one on It.
Algorithms: The recipe for computation What is an algorithm?
Algorithms: The recipe for computation What is an algorithm?
FLL Programming 101 RoboLab™
Apple pie Photo from: Kotikokki.net. Ingredients 200 g butter 1,5 dl sugar 3 dl flour 1 egg 0,75 dl milk 1 tsp baking powder 1 tsp vanilla sugar 3-4 apples.
Introduction By: Dr. Javad Razjouyan. Programming Languages.
Recipes from St Lucia.
How to make scones A special recipe made by form 54.
GA Standards BCS-CMW-16 Students will discuss examples that identify the broad interdisciplinary utility of computers and algorithmic problem solving in.
Algorithms: The recipe for computation What is an algorithm?
1 Computers Can’t Cook! Programming Methodology Girls Engaged in Math and Science, June 2012 Bri Chapman.
End Show Writing a computer program involves performing the following tasks. 1. Understanding the problem 2. Developing an Algorithm for the problem 3.
The Algorithmic Model. What is Computer Science What is Programming Algorithms –Definition –Properties of Good Algorithms –Describing Algorithms –Examples.
Pancakes. Person 1 In a medium size bowl measure 1 c flour 2 T sugar 2 tsp baking powder 3/4 tsp salt - mix thoroughly.
Computer Science 101 Introduction.
1 CSCI N201 Programming Concepts and Database 9 – Loops Lingma Acheson Department of Computer and Information Science, IUPUI.
Stake By Maria Dilling and Julian Hutcheson. Ingredients What you will need: 6 large slices of white bread 250 ml milk 2 eggs A pinch of salt (very little!)
Pineapple Upside Down Cake Katherine Babbini. Collect all your ingredients.
Apple Cinnamon Muffins. Person 1 In a bowl mix 1 ½ c flour 3/4 c white sugar ½ tsp salt 2 tsp cinnamon 2 tsp baking powder.
HOW TO MAKE PIKELETS. BY STELLA APOSTOLIDES.. THIS RECIPE MAKES 20 PIKELETS. You will need: 2 cups of self raising flour. ¼ tsp salt [optional]. 1/3 cup.
The Robot and the Wall Introduction to Pseudocode Your Name Goes Here.
Chapter 2 - VB 2005 by Schneider- modified by S. Jane '081 Chapter 2 - Problem Solving 2.1 Program Development Cycle 2.2 Programming Tools.
1 ©2006 INSciTE Common Blocks. 2 ©2006 INSciTE Common Blocks Common blocks are full featured actions Like English statements Move Wait for an action Display.
Tutorials NXT-G / EV3 Programming. Tutorials NXT-GEV3.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Storyboard By: Sarah odom. How to Make French Toast By: Sarah Odom.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
How to Make Chocolate Chip Cookies Fast, Easy, and Yummy Original Author Unknown Modified By: CTAE Resource Network.
Food for Thought Introduction to “ First Choice ” Chapter 4.
Part of the Mathematics glossary: An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. The word derives from the name.
LET’S FINISH - TODAY’S OBJECTIVE: Create an algorithm to direct a human “robot” from one part of the room to another. Create an algorithm to direct a human.
Individual Chocolate Layer Cakes
Program design Program Design Process has 2 phases:
Computer Science Department
How to Measure Accurately
Muffin recipe.
ALGORITHMS AND FLOWCHARTS
Algorithms: The recipe for computation
Learning Objective: to be able to design programs that use sequencing.
BRITISH FOOD.
Computational Thinking for KS3
Using a Drawing Robot to Make Angles (Using Rotations)
Using a Drawing Robot to Make Angles (Using Rotations)
Section 1.5 Adding Integers
Algorithms: The recipe for computation
Presentation transcript:

1 ©2006 INSciTE Problem Solving

2 ©2006 INSciTE Generic Problem Solving Process Define the problem Brainstorm solutions Evaluate solutions Pick one Try (implement) it Evaluate results Express the solution as an algorithm, then convert it into a computer program.

3 ©2006 INSciTE From: What’s an Algorithm? An algorithm (pronounced AL-go-rith-um) is a procedure for solving a problem. The word derives from Mohammed ibn-Musa Al-Khowarizmi, a mathemetician of the royal court in Baghdad. He lived from about 780 to 850. Al- Khowarizmi's work is the likely source for the word algebra as well. A computer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem.

4 ©2006 INSciTE Mix eggs, milk and flour and pass through a strainer. Dip slices of bread into the mixture and drop into a buttered frying pan. Fry both sides. Before serving, sprinkle with powdered sugar. Recipe for French Toast How can we make this more “algorithm-like”? Count eggs, mix eggs, for every 2 eggs add 1 cup milk and 1/4 cup flour, and pass through a strainer. For every 2 eggs, dip 8 slices of bread…. An Algorithm is like a Recipe 8 slices of bread 2 eggs 1 cup milk 1/4 cup flour fat or butter powdered sugar

5 ©2006 INSciTE Ways to Express Algorithms In the real programming world there are many ways to do this In the FLL world, probably the two best ways: Draw block diagrams Literally act it out Always talk it out and test it using a team member to walk through it acting like the robot. Keep actions at low level Go Forward 3 steps Stop Motor B forward, C backward

6 ©2006 INSciTE Pseudocode Pseudocode: Not software code, not English, but somewhere in between. Count Eggs Add Ingredients Mix and Strain Dip, Fry, Sprinkle Serve set counter to zero for each egg increment counter crack open into bowl next do counter times add ½ cup milk add ¼ cup flour end do do counter/2 times do 4 times dip 2 slices of bread fry, sprinkle, serve end do

7 ©2006 INSciTE Flowcharts Flowcharts: A graphic representation of logic. Convert from pseudocode. One step closer to software. set counter to zero for each egg increment counter crack into bowl next Set Counter to 0 Increment Counter More Eggs? Crack Egg into Bowl Yes No

8 ©2006 INSciTE We’ll be adding to this process as the class progresses FLL Ace Programmer in 5 Steps Map the generic problem solving process to programming Create a map of where the robot goes and what it does Write what the program should do (your algorithm). Code it Test, and fix, little pieces at a time

9 ©2006 INSciTE Example Algorithm Set direction and power of motors Stop motors, turn right. Turn right by reversing right-side motor Turn motors for ? rotations. Stop motors Make robot go forward 5 rotations and then turn right 90º

10 ©2006 INSciTE Conversion to a Program Forward: Motors B and C forward Spin: Motor B forward, C backward, Power Level 50% 250 degrees motors brake.

11 ©2006 INSciTE Optimizing Code Which is faster? more reliable? best? Use the one that makes sense to you, the programmer.

12 ©2006 INSciTE Debugging and Analysis Literally walk through it Ask lots of questions What ifs Do little pieces at a time For example, get the robot to where it needs to be first, then work on getting it to do something Reuse pieces that work For example, you know how to turn 90° Feel confident in your algorithm before starting to code it.

13 ©2006 INSciTE Common Situations Not sure which solution is better Try them both, or at least the primary element of each Which is easiest for your team to do? Can’t think of all the steps needed for the algorithm Program and test the steps you understand.