Alice Variables Pepper. Set to Java look Edit / preferences restart.

Slides:



Advertisements
Similar presentations
Getting Started With Alice: The Basics By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Advertisements

Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010 modified July 2011.
Alice Learning to program: Part Four Creating Sounds, Making Billboards, Fun with 3-D Text, New Events, and Rotating Objects by Ruthie Tucker and Jenna.
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
How Tall Are You? Introducing Functions By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made June 2014 by.
Princess & Dragon Part 2: Teaching a Dragon to Fly—Methods & Properties By Elizabeth Liang under the direction of Professor Susan Rodger Duke University.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Lights Camera Action! Part 3: BDE Events By Deborah Nelson under the direction of Professor Susan Rodger Duke University July 2008.
Creating Functions Pepper. Homework Asking the user: –Drag variable to create a set statement –Drag a world function NumberDialog or StringDialog over.
Wizard Game: Class-Level Variables in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July
Creating a 3D Interactive Story Prof. Susan Rodger Duke University Feb. 24, 2007.
Calvin and Hobbes Teach Properties and Functions Created by Daniel MacDonald under the direction of Professor Susan Rodger Duke University June 2013.
Alice Learning to program: Part Two by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
01-Intro-Object-Oriented-Prog-Alice1 Barb Ericson Georgia Institute of Technology Aug 2009 Introduction to Object-Oriented Programming in Alice.
Making a Book Report in Alice by Jenna Hayes Under the direction of Professor Susan Rodger Duke University, June 2010.
Checking for Collisions Ellen Yuan Under the direction of Professor Susan Rodger at Duke University June 2014.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Variables and Functions Chapter Variables Named storage location in computer’s memory Programs may need to store data when running o Stored in.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
Making a Timer in Alice.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
Making a Boat Racing Game in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2010.
How to Create a Professional Video Using Windows Live Movie Maker.
Shorter of two objects and changing color V2 Functions, events and setting the color in sequence and randomly This is a modification of the Changing Color.
3–D Helium Molecule Tutorial Alice Project Duke University Professor Susan H. Rodger Gaetjens Lezin June 2008.
Nonvisual Arrays and Recursion by Chris Brown under Prof. Susan Rodger Duke University June 2012.
Getting started with Alice Adapted from presentations by Jenna Hayes, Duke University Donna Gavin, UWP Computer Science and Software Engineering.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
Changing Color, Using Text Objects, and Random Selection in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
Teaching a character to walk in more than one world: Parameters and Inheritance. By Lana Dyck under the direction of Professor Susan Rodger Duke University.
Methods Tutorial: Part Two By Deborah Nelson Duke University Professor Susan Rodger June 16, 2008.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
An Introduction to Alice (Short Version) – Extras! Yossra Hamid Under the Supervision of Professor Susan Rodger Duke University, June 2014 This is a continuation.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Name here please :0. Click for movie Complete this activity and paste answers here!activity Complete this activity and paste answers here!activity 11.
Alice Learning to program: Part Two Writing Your Own Methods by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops Susan Rodger Duke University July 2011.
Variables and Functions Chapter Variables Named storage location in computer’s memory Programs may need to store data when running Types of data.
The Essentials of Alice (Bunny) By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
Illuminating Computer Science CCIT 4-6Sep
1 Quiz Template: Using the ‘ask user’ functions By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 2009.
Nonvisual Arrays by Chris Brown under Prof. Susan Rodger Duke University June 2012.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Lesson 1. Security At the menu bar at the top you will see the word Tools. Click your mouse on Tools scroll down to Macro. Move the Mouse over and down.
An Introduction to Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University, June 2009 Updated June 2014 by Ellen Yuan.
BDE tutorial By Deborah Nelson Duke University Under the direction of Professor Susan Rodger July 13, 2008.
Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010.
Illuminating Computer Science CCIT 4-6Sep
Using Placeholders to Simplify your Methods: Learning Methods, Part 2 By Deborah Nelson Duke University Professor Susan Rodger June 16, 2008.
If you don’t have Google Earth downloaded already, you can go to to get it.
Princess & Dragon Part 3: A Knight Comes Riding In—Cameras & Events By Elizabeth Liang under the direction of Professor Susan Rodger Duke University June.
How Tall Are You? Introducing Functions for Alice 3 By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008 Updates made.
The Essentials of Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University May 2009.
Getting Started With Alice: The Basics. Step 1: Background Open up Alice, and choose a background for your Alice world. Your world is something you can.
The Essentials of Alice (Bunny)
Getting Started With Alice: The Basics
Comparing objects and changing color
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Memory Matching Challenge
Creating Functions Pepper.
Alice Variables Pepper.
Introduction to TouchDevelop
Introduction to Object-Oriented Programming in Alice
Getting Started With Alice
Getting Started With Alice: The Basics
Presentation transcript:

Alice Variables Pepper

Set to Java look Edit / preferences restart

Homework process if it was not Okay for Need to be learning in addition to handing in work

What you should be learning Project process – design, code, test Line by line flow of a program, dipping into and back from methods and functions Methods – Types – world, object – Calling method vs Defining method – Why to use (break, teach, reuse)

More to know Use functions – Answers a question – Returns value – Match to the type of value (The method did not return a value.)

Know about variables boxes hold certain type of data Can be set and changed When used, will have the value at a moment in time. Little quiz

Local Variable What: A box that holds a value the method can see and change on each run How to create: Click create new variable on right How to set: drag down to become a green line How to use: drag on top of a value of the same type Why:

Local Variable - Why Can change once and control more than one result - helped some people play with results to make a smooth movie Can get input from user or random value to put into value Can do calculations on that value If you know there will never be a change, less value to a variable Making something a number instead of a variable is called hard coding

Parameters What: Give control outside method How to create: Click the create new parameter button How to set initially: give a value in the calling method How to reset: drag down to become a green line How to use: drag on top of a value of the same type WHY?

Why Parameters Help you reuse methods Ex: Let the situation control how high to jump The one making the method does not need to know value, but must code for all possible values

Coming objectives Asking user for input Create functions Property variables Extra - read in book – movement – vehicle

Practice Review: My rule for my dancer: This dancer always spins right twice as much as left. One scene with one dancer – Dancer spin right 2 times – Dancer spin left 1 time – Dancer move forward 1 meter – Dancer spin right 2 times – Dancer spin left 1 time

Practice review Note the use of parameters. Does your spin method have parameters? I changed my mind, make it 14 times right and 7 times back - how did a variable help that?

Practice review change 2 Add the dancer asks how many times to spin and then spins the number you tell her forward that many and back ½ as many – Could you do this without a variable? – Show how to set a variable as the answer to a question. (First set, then drag world question function - note using a function)

Practice Review 2 solution Which is the calling method here? Which is the called method? What is being returned from the method? What is being returned from the say function?

Practice Review 3 Now, I don't want to ask the user. Instead, I want the main method to tell the dancer to spin 6/3 the first time and 2/1 the last time. What do I use to help me do this now?

Practice Review 3 solution How did parameters and variables help you in your homework? Did it make it easier to keep trying different movements until you found one that looked good? Now pass the dancer something to say. Can't do that with a number.

Functions we have used World User question for number World to String Bunny Distance to

Make your own function to have the ballerina ask the user their first name and last name and return the full name. remember a+b world function Story is now: – Dancer asks your first and last name – Dancer spin right 2 times – Dancer spin left 1 time – Dancer says hello to you – Dancer move forward 1 meter – Dancer spin right 2 times – Dancer spin left 1 time – Dancer says goodbye to you

New function solution

New function questions Which command used the function? Why did you need a variable in this case to put the function into? Can you use this function without putting it into a variable?

Homework Have finished reading chapter 1, 2 & 3 Each person should add 2 methods to any one character. 1) a whoAmI function that will ask the user for his first name and last name and return the full name. 2) a sayHello method that accepts a name parameter and will say "My name is " and the name parameter and "It have a movie for you." When the methods have been added, please upload your character to the discussion board. Then, one person can create a movie with these characters. Create a variable for each character's name. Then it should ask the user to name the characters (meaning set variable to the whoAmI function). Then, it should call the sayHello method on each character, passing in their name. Only one person needs to upload. Please name the world file with both people's names. ex: kris_pepper_and_mary_smith.a2w