CS001 Introduction to Programming Day 3 Sujana Jyothi

Slides:



Advertisements
Similar presentations
Sprite-visual object (actor on the stage) Scripts- Tells actors (sprites) what to do.
Advertisements

Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
CS 101 Introductory Programming - Lecture 7: Loops In C & Good Coding Practices Presenter: Ankur Chattopadhyay.
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
CHAPTER 5: Repetition Control Structure. Objectives  To develop algorithms that use DOWHILE and REPEAT.. UNTIL structures  Introduce a pseudocode for.
CS0004: Introduction to Programming Repetition – Do Loops.
Intro to Programming Algebra-Geometry. Computer Programming? What is programming? The process of writing, testing, and maintaining the source code of.
Module 1- Getting Started Tell me what to do Using sets of instructions…
Module 1- Getting Started Tell me what to do Using sets of instructions…
1 Starting to Program From Scratch scratch is a new programming language that lets you create your own interactive stories, animations, games, music, and.
1 Lecture 7:Control Structures I (Selection) Introduction to Computer Science Spring 2006.
Intro to Programming CST JavaScript. Objectives Define software Identify the different types of software Differentiate the different types of programming.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
index.php Palmyra Area High School 1.
CS001 Introduction to Programming Day 1 Sujana Jyothi
Introduction to.
V Avon High School Tech Club Agenda Old Business –Delete Files New Business –Week 16 Topics: Intro to HTML/CSS –Questions? Tech Club Forums.
An Introduction to Textual Programming
COMP 1001: Introduction to Computers for Arts and Social Sciences Programming in Scratch Monday, May 16, 2011.
Study Guide For Test Chapter 5, 6,& 7 Test is Friday, May 15th.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
Programming & Scratch. Programming Learning to program is ultimately about learning to think logically and to approach problems methodically. The building.
Introduction to Arrays. definitions and things to consider… This presentation is designed to give a simple demonstration of array and object visualizations.
Engineering 1020 Introduction to Programming Peter King Winter 2010.
Module 1- Getting Started Tell me what to do Using sets of instructions…
Bug Session Four. Session description Objectives Session activities summary Resources Prior knowledge of sequencing instructions using Bug Bug website.
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
CPS120 Introduction to Computer Programming The Programming Process.
CPS120: Introduction to Computer Science Decision Making in Programs.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
An Introduction to Programming with C++ Sixth Edition Chapter 7 The Repetition Structure.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
Introduction to Programming G50PRO University of Nottingham Unit 2 : Introduction To Scratch Paul Tennent
Algorithms Writing instructions in the order they should execute.
1 CS161 Introduction to Computer Science Topic #9.
CS001 Introduction to Programming Day 2 Sujana Jyothi
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Pseudocode. Algorithm 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.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
Scratch Programming Cards
Programming & Scratch.
Scratch for Interactivity
Scratch: iteration / repetition / loops
Diamond Hunt Mock Programming Project.
Introduction to Computer Programming
Loops CS140: Introduction to Computing 1 Savitch Chapter 4 Flow of Control: Loops 9/18/13 9/23/13.
CPS120: Introduction to Computer Science
An Introduction to Control Structures
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Design and Implementation
Chapter 8: More on the Repetition Structure
Visual Basic – Decision Statements
Computer Science Core Concepts
ICT Programming Lesson 3:
ICT Gaming Lesson 3.
An Introduction to Control Structures
ICT Gaming Lesson 2.
Flow of Control.
The structure of programming
Introduction to Snap Programming
Introduction to Computer Science
Repetition Statements (Loops) - 2
The structure of programming
Thinking procedurally
Scratch 7B IT 1.
Presentation transcript:

CS001 Introduction to Programming Day 3 Sujana Jyothi

2 What have we learnt so far? Program – sequence of steps Terms learnt: source code, compiler, statement, data-type, variable, constant. Sequence, Decision

3 Resources –Use the material from my website. Save your work –on your flash drive –or it to yourself

ALGORITHM An algorithm is a systematic list of instructions for accomplishing some task, and the task can be anything that has a recognizable end-point (or result). Often some of the specific steps in the procedure are to be repeated until the task is done. Imagine you have a random, unsorted list of numbers. Our goal is to find the highest number in this list. 1. Pretend the first number in the list is the largest number. 2. Look at the next number, and compare it with this largest number 3. Only if this next number is larger, then keep that as the new largest number 4. Repeat steps 2 and 3 until you have gone through the whole list.

ALGORITHM EXAMPLE A farmer has to take three items, a dog, a goat and a cabbage, across a river. He has a boat but it can take two objects at once, in other words, the farmer and one other item only. If the dog and the goat are left together, the dog will bite the goat. If the goat and the cabbage are left together the goat will eat the cabbage. WRITE AN ALGORITHM TO TELL THE FARMER HOW TO GET THE THREE ITEMS ACROSS THE RIVER.

Learn Programming Through Scratch Scratch -> "new programming language that lets you create your own animations, games, and interactive art."

Statement in Scratch Tells the computer to do something Instructs a sprite to say something Instructs a sprite to go to some location Called BLOCKS in SPRITE

Logic Structures Sequence Decision / Selection if statement Looping / Iteration/ Repetition for statement while statement

Boolean Expression Boolean expression is an expression that is either true or false. TRUE when the mouse is down FALSE when the mouse is not down TRUE when ??????? FALSE when ????????

Decision if statement Instruct a sprite to say hello only if, the user has depressed the mouse button

Decision If - else statement Instruct a sprite to say hello or goodbye, depending on whether the user has pressed the mouse button or not.

Looping / Iteration/ Repetition