Algorithms and Flow Charts

Slides:



Advertisements
Similar presentations
CS 240 Computer Programming 1
Advertisements

Netlogo and its Relatives Logo (Papert) –Language for teaching mathematics graphically –Tell turtle how to move Starlogo (Resnick) & StarlogoT (Wilensky)
Session Objectives# 24 COULD code the solution for an algorithm
New Mexico Computer Science For All
Computer Science 1000 LOGO I. LOGO a computer programming language, typically used for education an old language (1967) the basics are simple: move a.
ITEC113 Algorithms and Programming Techniques
Using Logo and Logic Please use speaker notes for additional information!
Chapter 2 The Algorithmic Foundations of Computer Science
CHAPTER 4: ALGORITHM 4.1 Introduction stages identified in the program development process: 1. Problem analysis and specification 2. Data organization.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Review Algorithm Analysis Problem Solving Space Complexity
Algorithm & Flowchart.
CSC103: Introduction to Computer and Programming
LO: We’re learning to understand how computers solve problems!
LOGO SOFTWARE BY: SAVE 9S. INTRODUCTION Logo is a software that can be found at : Shared area> High School > ICT > take home software > LOGO32. This is.
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
Graphics and Procedures Programming Right from the Start with Visual Basic.NET 1/e 5.
Introduction to Algorithms By Mr. Venkatadri. M. Two Phases of Programming A typical programming task can be divided into two phases: Problem solving.
Introduction to Algorithms using Netlogo. What’s an Algorithm Definitions of Algorithm on the Web: –A procedure or formula for solving a problem.
MSW Logo By Awin 9s.
Logo For beginners By Dali Matthews 9S What is logo?
Software Life Cycle What Requirements Gathering, Problem definition
The Programming Process Define the problem* Make or buy software? Design the program * Code (write) the program Test (debug) the program Document the.
Chapter 2: General Problem Solving Concepts
Definition of Terms Software/Programs Programs that directs the operation of a computer system Set of instructions Codes Programming Process of planning,
CONTROL SYSTEMS Control Systems A command is a directive that performs a specific task An argument is a variable that can be used by the function reveiving.
Algorithm Design.
Advanced Program Design. Review  Step 1: Problem analysis and specification –Specification description of the problem’s inputs and output –Analysis generalize.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Structured Programming (4 Credits)
Algorithm Discovery and Design Objectives: Interpret pseudocode Write pseudocode, using the three types of operations: * sequential (steps in order written)
LOGO For the beginner Made by Rio Narazaki. W HAT I S L OGO ? Logo is a computer programming language used in Education. Logo is very easy to use. The.
Flowchart. a diagram of the sequence of movements or actions of people or things involved in a complex system or activity. a graphical representation.
Pablo Revelo. Birds: to 3birds pu home pd lt 80 pu fd 250 pd setpensize 2 setpc "white st bird pu bk random 100 bird pu lt 90 fd random 40 bird ht.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Search for it on your computer
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
What is it? How to use it and how useful can it be?
 Problem Analysis  Coding  Debugging  Testing.
Program design Program Design Process has 2 phases:
Learning outcomes 5 Developing Code – Using Flowcharts
Understand Problem Solving Tools to Design Programming Solutions
3.1 Fundamentals of algorithms
LOGO 32 By: Xenon 9S.
Algorithm & Programming
Welcome to Computer Science Jeopardy
Data Structures and Algorithms
Understand Problem Solving Tools to Design Programming Solutions
Algorithms An algorithm is a sequence of steps written in the form of English phrases that specific the tasks that are performed while solving the problem.It.
Lecture 2 Introduction to Programming
Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.
Programming Fundamentals
Problem Solving (design of programs) CS140: Introduction to Computing 1 8/26/13.
ALGORITHMS AND FLOWCHARTS
Unit# 9: Computer Program Development
JavaScript: Functions Part II
Computers & Programming Languages
ALGORITHMS AND FLOWCHARTS
Computational Thinking for KS3
Chap. 3 Functions Start Python IDLE (Shell) and open a new file.
Introduction to Algorithms and Programming
ME 142 Engineering Computation I
The Programming Process
Graphics Animation Using Terrapin LOGO
Computer Science Core Concepts
POWERPOINT PRESENTATION
Institute for Entrepreneurship and Career Development (IECD)
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Learning Objective: to be able to design programs that use iteration.
Presentation transcript:

Algorithms and Flow Charts

Algorithms A procedure or formula for solving a problem. Drawing a square in Netlogo

Representation of Algorithms Desirable Features Language independent Unambiguous Easy to understand A standard---understood and known by many Solution Flow charts

Drawing a square As a flow chart:

Using variables More general?

Repetition

Repetition in Netlogo On the previous slide while ;; repeats forever loop repeat ;; repeats forever pd loop [ fd 0.5 rt 1 ] ;; the turtle draws a circle pd repeat 36 [ fd 1 rt 10 ]

Decision

Decision if else statement if statement [ ifelse (xcor > 0) [ set color blue ] [ set color red ] ] [ if (xcor > 0) [ set color blue ] ]

Procedures

Input and Output

Symbol Summary These seven symbols are used the most:

The Bug Game Implemented in Netlogo; here is the file Objective: pick up all the food and return home in the fewest moves

The Bug Game Write the procedure go using the following instructions (each instruction is actually a procedure call): turn-right turn-left move-forward dist (dist must be specified) pickup-food see-food (sets variables) see-start (sets variables) at-food (sets variables) at-start (sets variables)