Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter One Problem Solving

Similar presentations


Presentation on theme: "Chapter One Problem Solving"— Presentation transcript:

1 Chapter One Problem Solving
Objectives: 1- Understand what is “ Programming”? 2- Define “Problem” & “ Problem Solving”. 3- Identify the 5- Stages of Problem Solving. 4-Writing “ Algorithm” 5-Draw “ Flow Chart”

2 1- Understand what is “ Programming”?
Eat a meal Cook that meal Buy A Robot Build A Robot Use a Game / Software Create yours with your OWN Criteria Programmer User Programming Languages : C , C++, Basic , Visual C , Visual Basic

3 2- Define “Problem” & “ Problem Solving”.
Objectives Outputs Target/Aim/Goal - Sequence of Steps -Activities Specific Inputs Through Using Attain / Reach Problem Solving Problem

4 Define : 1- Problem. 2- Problem Solving .
Class Activity: Using the Cards _ Group discussion Define : 1- Problem. 2- Problem Solving . Ex: 1- “ Blue Hole” / “Black or White Desert”/ “Cosmic Village” 2- Bake a Cake.

5 3- “ Problem Solving” Stages (5 Stages) :
1. Define the Problem: Outputs. Inputs. Executing Arithmetic or Logical Operations Example (1): 2 + 3 Example (2): A kid have 100 pounds, bought a dark choc. for 48 pounds & bottle of water for 4 pounds, So ??

6 3- “ Problem Solving” Stages (5 Stages) Cont.
2. Step by step solving problems: Write an Algorithm الخوارزمي 2. Draw a Flow Chart Start Example (1): 2 + 3 Input 2 , 3 Start Inputs : 2, 3 Sum of 2 + 3 Output the Sum. End Sum = 2 + 3 Output Sum End

7 Benefits if using Flowcharts:
1- Promotes / facilitate understanding the problem and shows the tasks when writing program codes. 2- Explains the program to others 3- Convenient tool for documenting the program.

8 The Algorithm is represented by drawing flowcharts.
A Group of logically arranged procedures to be executed to attain an output using specific inputs. The Flow Chart is: It’ a diagram uses standard Graphical symbols or shapes to illustrate a sequence of steps required to solve the problem. The Algorithm is represented by drawing flowcharts.

9 3- “ Problem Solving” Stages (5 Stages) cont.
3. Design the Program: Writing the code Using a programming Language

10 During writing program code we can make mistake.
3- “ Problem Solving” Stages (5 Stages) cont. 4. Program Testing ( Debug): During writing program code we can make mistake. So, We have to check and enter the data and compare to check the errors and debug / Correct them. Start Inputs : 2, 3 Sum of 2 - 3 Output the Sum. End Example (1): 2 + 3

11 3- “ Problem Solving” Stages (5 Stages) cont.
5. Program Documentation: Is documenting : Given input – output – plan – for solving the problem – drawn flow chart – programming language – last date modification – people who contribute to the program development Process. WHY ??? To go back for feedback or correction

12 1 5 2 4 3 Problem Solving Stages Problem Definition Program
Documenting -Writing all steps Taken to solve the problem - People Contributed Problem Solving Stages Input-Output-Solution 2 Step by step Instructions 4 Program Testing 3 -Writing Algorithm -Drawing a Flow Chart Program Design check and debug -Writing a code using a Programming Language

13 Flow Chart: Diagram that uses standard graphical symbols to illustrate: the sequence of steps required for solving a problem or specific question ( the algorithm)

14 The most commonly used Symbols:
Significance (Terminal): Start & End ( Input / Output ) (Process): Arithmetic / Logical (Decision): Yes / No (Flow Lines): Directions

15 Example(1-1): Second : Algorithm First : Define the Problem
Draw a flow chart that will calculate the sum of two numbers entered by the user and display the result: First : Define the Problem Outputs: The sum of Two Numbers Inputs: The 1st number is “A”, The 2nd number is “B” Solution: C = A+B , where C is the result Third : Flow Chart Second : Algorithm 1- Start 2- Enter The Number A and the Number B 3- Perform the SUM using : C=A+B , while C is the output 4- Print C 5- End Start Enter A and B C = A+ B Output C End


Download ppt "Chapter One Problem Solving"

Similar presentations


Ads by Google