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.

Slides:



Advertisements
Similar presentations
Harry Potter Scratch Game
Advertisements

Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Introduction to TouchDevelop
Matlab tutorial course Exercises 4:. Exercises – for loops Download the scripts loops_example.m and if_else_example.m, run the code Download the function,
CS001 Introduction to Programming Day 3 Sujana Jyothi
Scratch Programming Session 9 of 10 Review elements to use in stories, games, etc.
An Intro to Robots and Computer Programming
1 Random numbers Random  completely unpredictable. No way to determine in advance what value will be chosen from a set of equally probable elements. Impossible.
Bug Session Two. Session description In this session the use of algorithms is reinforced to help pupils plan out what they will need to program on their.
Bug Session Three. Session description In this session, pupils will discover how the Bug software makes drawing shapes easier (this is based on the use.
Menu System ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Lists. Lists store information in a certain order. You can add, remove, or rearrange items in a list. You can also pick out information from a list.
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Spiral Rider PAGE 1. Set Up Scene 1.Add Stage-underwater scene 2.Add crab sprite 3.Add two fish sprites PAGE 2.
Visual Basic .NET BASICS
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Using Waits, Loops and Switches WAIT please!. Waits, Loops and Switches Pre-Quiz 1. In programming, what is a loop? When is a loop useful? 2. How can.
DiceRoller DiceRoller (object class) and DiceRollerViewer client class: Write a DiceRoller class (similar to Yahtzee) to: Allow the person to initially.
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
Learning the skills for programming Advanced Visual Programming.
Bug Session Three. Session description In this session, pupils will discover how the Bug software makes drawing shapes easier (this is based on the use.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 18 - WMLScript: Control Structures II Outline 18.1 Introduction 18.2 Essentials of Counter-Controlled.
Scratch Programming Lesson 2 First glance to programming logic.
1 Understand how to use Scratch to: – Animate a sprite – Add sound to your script – Use the forever command to create a loop Lesson 2: Learning Objectives.
Making a Timer in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
1 ball, 2 ball, red ball, blue ball By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
BBC Microbit Getting set up and making your first program.
The If Block. IF The “if” block can be found in the control tab. The if block means, “IF this happens, THEN do this.” You can put blocks ON the if block.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
BDE tutorial By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 13, 2008.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
1 CSC 221: Computer Programming I Fall 2009 Introduction to programming in Scratch  animation sprites  motion, control & sensing  costume changes 
Microsoft® Small Basic Conditions and Loops Estimated time to complete this lesson: 2 hours.
Intro CS – Probability and Random Numbers Lesson Plan 6a.
ADVANCED EV3 PROGRAMMING LESSON By Seshan Brothers Random Block.
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Starter Activity Instructions: Complete the starter sheet Planner
Using Base Ten Blocks to Make Numbers to 100
Diamond Hunt Mock Programming Project.
Objective of the lesson
Hacking Minecraft on the Raspberry Pi using Python
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
Creating Variables Output Logic flow Operators (More) Basic blocks
Objective of the lesson
Objective of the lesson
Objective of the lesson
BBC Microbit.
BBC Microbit.
Introduction to TouchDevelop
BBC Microbit.
Objective of the lesson
Objective of the lesson
Objective of the lesson
BBC Microbit.
Objective of the lesson
Presentation transcript:

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 of you will: – Make the dice display a random number when you press a button Some of you will: – Test your dice in a Snakes and Ladders Codebug board game 2

3 Go to Click on CREATE and then on the Blockly Tab You will see a simulation of the Codebug. The Triangular Play button can be used to run your program and view what will happen once you download to your Codebug

4 The dice will roll when you press the Button A. It will create a random number, either 1,2,3,4,5, or 6 It will display an image which represents the random dice roll number The dice can be rolled again and again We will need a repeat while True loop

5 The random number will be pressed when the Button A is pressed

6 The random number will change each time. Something which changes is called a variable

7 Add a variable This is the ‘set item to’ block We need to give this variable a better name than ‘item’ The name of the variable should be one word Click on the ‘item’ drop down box and Rename the variable to ‘Roll’

8 We need to create a random whole number. A whole number is called an integer. It needs to be either 1,2,3,4,5 or 6 or in other words it needs to be between 1 and 6 This number is stored in the variable called ‘Roll’

9 We now need to display an image if the random number (stored as ‘Roll’) = 1 We need another if do block We need it to say ‘if Roll = 1’ You will need a Logic block and add in the Roll variable

10 We now need to it to display the image if ‘Roll’ = 1

11 We now need to it to display the image if something else is rolled e.g. if ‘Roll’ = 2 We need an ‘else if’ Click on the cog and drag in the else if block Click on the cog again to apply the changes

12 It should now look like this We now need so add in the block to draw the image if ‘Roll’= 2

13 It should now look like this

Challenge 1. Add more ‘else if’ blocks Add more images HINT: You will need an ‘else if’ block and an image if Roll = 3,4,5 or 6 2. Print off your Snakes and Ladders board and add the Codebug dice Click on the image to download

15 Answers