Category Archives: Alice.org

How to Use Parameters in Alice 2

ALice lets you create methods that use parameters. So , let’s look at how you can create and use them

 

Step 1 ) In an object’s method, click the “create parameter” button

create-parameter-button-alice

Step 2 ) Inside the method editor, use that parameter.  This often involves writing a loop , possibly something along the lines of the code below:

use-the-paramet-somehow

Step 3) Now you can call the method from another place like the world.myfirstmethod

call-the-the-method-from-another-place

 

 

You can even use an “object” as a parameter in Alice

 

via GIPHY

 

What are Variables in Alice (alice.org)?

car-sign-object-alice

To Make a variable, click on the “Make a variable” button

variable-button-in-alice2

Then you have to decide on the type of variable

type-of-variables-in-alice

The “Big” Types of Variables

number = 3.1, 3  , 4.5

boolean = true or false

string = “abc”,   “3.1” ,   “&*(&^”, “true”, “false”, “  ” ”

strings are just things in quotes

 

alice-make-variable-example

 

In order to crete a variable, you click on the “create new variable” button , choose a type and , if you want , give it a value in the method editor.

how-to-create-variable-in-alice