Scratch – Simple Programming

Slides:



Advertisements
Similar presentations
1 CSC103: Introduction to Computer and Programming Lecture No 8.
Advertisements

TIK-20 Computer and Information Science April 3, TIK20 - West Hill C.I. - Spring 2009.
Chapter 4 MATLAB Programming Logical Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ALGORITHMS AND FLOWCHARTS
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Scratch – Simple Programming
Programming Fundamentals. Today’s lecture Decisions If else …… Switch Conditional Operators Logical Operators.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Databases – Part 1 Databases– Part 1 Lesson 5 & 6.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Scratch Programming Lesson 4 Question asking and answering.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 4.
Agenda Basic Logic Purpose if statement if / else statement
Conditional Loops CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Unit 2 – Spreadsheets Spreadsheets - Project Computer Shop.
Think Possibility 1 Iterative Constructs ITERATION / LOOPS C provides three loop structures: the for-loop, the while-loop, and the do-while-loop. Each.
FORM VALIDATION (Java Script ). Required Fields A required field in a form is a field that MUST have at least some content before the form will be processed.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
Shell script – part 2 CS 302. Special shell variable $0.. $9  Positional parameters or command line arguments  For example, a script myscript take 2.
Scratch – Simple Programming
Programming Simple Programming If and Nested Statements.
Unit 2 – Spreadsheets Spreadsheets If Statements.
Databases – Part 1 Databases– Part 1 Lesson 3 & 4.
GCSE Computing – Topic 2 Lesson 5a – Binary Logic CHALLENGE TO: identify the different types of logic diagrams. ASPIRE TO: Construct a truth table for.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
Programming Simple Programming Variables.
Scratch Programming Cards
Component 1 Logical operators.
REPETITION CONTROL STRUCTURE
Scratch 7B IT1.
Topics Introduction to Repetition Structures
Scratch – Simple Programming
Chapter 4 MATLAB Programming
Chapter 5: Control Structure
Basic operations in Matlab
Chapter 6: Conditional Statements and Loops
CHAPTER 4 CLIENT SIDE SCRIPTING PART 2 OF 3
Scratch – Simple Programming
ALGORITHMS AND FLOWCHARTS
Learning to Program in Python
Program Design Introduction to Computer Programming By:
Computers & Programming Languages
Programming In Lesson 3.
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
1) C program development 2) Selection structure
ALGORITHMS AND FLOWCHARTS
IPC144 Introduction to Programming Using C Week 3 – Lesson 1
CSE 1020:Control Structure
Design and Implementation
Chapter 5: Control Structure
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
The first number is posted telling what random number was selected, I did this for testing purposes, in the real thing it would not be there. Since the.
Language Constructs Construct means to build or put together. Language constructs refers to those parts which make up a high level programming language.
Spreadsheets If Statements.
Flowcharts and Pseudo Code
An Introduction to Linux
Variables & getting info from the user
Programming In Lesson 4.
Using Script Files and Managing Data
Repetition Statements (Loops) - 2
True / False Variables.
Basic Mr. Husch.
Python Selection.
Algorithms For use in Unit 2 Exam.
Scratch 7B IT1.
Starter Look at the hand-out.
Programming Fundamental
Scratch 7B IT 1.
Scratch 7B IT 1.
Scratch – Simple Programming
Presentation transcript:

Scratch – Simple Programming Broadcast http://www.yahmad.co.uk/

Unit Overview Objectives Outcomes Time Task 1 Task 2 Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the use of the repeat, If Statements (Commands) Understand the use of the Broadcast command Outcomes Time Task 1 100M Record Task 2 School – House or Year Group http://www.yahmad.co.uk/

Starter Broadcast (Discuss the Script) Male Female Using the Broadcast script can allow you to jump to a particular part of the script. If the Answer is = Male >> Then the Script will jump to the part of the script which says: When I Receive – “Male” http://www.yahmad.co.uk/

Task 1 – 100M Record (Part 1) You need to create a program to which will calculate if you have broken the 100M record based on your gender. You need to create variables to store the gender, best time and whether the record has been broken. If you are male then you record will be compared against the Male Best Time. If you are female then you record will be compared against the Female Best Time. The user will be required to enter their gender when prompted. The answer has to be either Male or female. The gender will then be stored in the variable. If the gender is male then the script will jump to Male section of the script. If the gender is female then the script will jump to female section of the script. If user input does not equal either “male” or “female” then the user will be promoted to enter their gender in again. This will repeat until the user has entered either “male” or “female” .

Task 1 – 100M Record (Part 2) The user will be prompted to enter their fastest time which will be stored in the best time variable. An if statement will have to determine whether the best record has been broken. If the record has been broken then a message including the new best time will be displayed. Best time stored in variable Logical Test: Best Time > Record True: You have broken the record. False: You have not beat the record. Best time stored in variable Logical Test: Best Time > Record True: You have broken the record. False: You have not beat the record.

Task 2 – House or Year Group (Part 1) You need to create a program to work out the pupils house or year depending if they are in primary or secondary school. If Pupils are in primary school then they will be prompted to enter their house. If Pupils are in secondary school then they will be prompted to enter their year group. A message will be printed telling pupils either their house master or year leader. The user will be required to enter their school when prompted. The answer has to be either Primary or Secondary. The school will then be stored in the variable. If the school is primary then the script will jump to primary section of the script. If the school is secondary then the script will jump to secondary section of the script. If user input does not equal either “primary” or “secondary” then the user will be promoted to enter their school in again. This will repeat until the user has entered either “primary” or “secondary” .

Task 2 – House or Year Group (Part 2) The script needs to include a welcome message and then a prompt for the user to type in their House. The script will repeat unless the user types in either Currie, Bell, Wright or Edison. The nested if statement will output the House Master. The script then needs to include a nested IF: If House is Currie (Set to variable) House master variable to Mr Ahmad If House is Bell (Set to variable) House master variable to Mr Hassine If House is Wright (Set to variable) House master variable to Mr Lawson If House is Edison (Set to variable) House master variable to Mr Eissa False: You can only type in house name - repeat Primary - House Nested IF

Task 2 – House or Year Group (Part 2) The script needs to include a welcome message and then a prompt for the user to type in their Year. The script will repeat unless the user types in either 7,8,9,10 or 11. The nested if statement will output the year tem leader. The script then needs to include a nested IF: If year is 7 (Set to variable) House master variable to Mr Smith If year is 8 (Set to variable) House master variable to Mr Amin If year is 9 (Set to variable) House master variable to Mrs Carr If year is 10 (Set to variable) House master variable to Mr Brady If year is 11 (Set to variable) House master variable to Ms Yalda False: You can only type in a year group - Repeat Secondary - Year Nested IF

Task 2 - Extension Can you make your own program containing a Broadcast and nested if statement http://www.yahmad.co.uk/

Plenary – Refer to the Lesson Objectives Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the use of the repeat, If Statements (Commands) Understand the use of the Broadcast command Plenary Task (Q&A) Peer assess each other scripts. Discuss the levels pupils have achieved for this task. Question: What is the purpose of the broadcast script? Question: What is the difference between an if and a nested if statement? http://www.yahmad.co.uk/