In this coding activity, you’ll use code to build your own fuzzes and explore fuzz properties and values.
A property is a feature or characteristic, belonging to something. You have properties that make you human, like hands, ears, and a nose.
Fuzzes have properties too! They have a body, eyes, and a mouth. Properties might look different from fuzz to fuzz.
All fuzzes have a body color - body color is a property. But body color can be changed! For example, the body color for blue fuzz is BLUE, while the body color for Simon is green.
Can you create a fuzz with unique properties?
Below are two coding activities (one beginner activity and one advanced activity) to help you practice using properties in the Kodable Fuzz Builder.
This is the Fuzz Builder. At the bottom, you’ll see fuzz properties sorted into 5 categories:
Remember, a category is a group of things that share something in common.
Beginner Coding Activity: Properties
Your challenge: Build your own fuzz character using 3 properties and 2 functions! Each item you select should be from a different category.
How can you do this? First, look through all the categories - which ones store properties, and which ones store functions?
Then, select your items. - make sure you count your lines of code - you should have the same number of code lines as categories!
If I only add a body then I have one line of code- and a silly looking fuzz who looks incomplete!
When you’re done, compare your fuzz to someone else’s. Are your fuzzes the same? What is similar about your fuzzes properties? What is different?
Advanced Coding Activity: Adding Values
You already know that a property is a characteristic, or feature, of an object. Fuzzes have properties that make them unique. They have eyes, a mouth, and a body.
Fuzzes have many properties in common. For example, all fuzzes have color - body color is a property. But as a programmer, you can change the property’s value to make body color vary from fuzz to fuzz.
For example, the value of the color property for blue fuzz is BLUE, but you would change that value to green for Simon!
The cool thing is that as a programmer, you can assign or change a property's value in your code and it will change what a user sees!
Let’s check it out in Fuzz Builder. Here is a body property - Definitely want my fuzz to have that!
But there are different colors of bodies here. I can assign the value “green” to this body.
I can also change it to gold.
The property itself doesn’t change - this fuzz still has a body! But color is variable, which means it can change depending on what you assign.
Your challenge: Build two fuzz characters by adding properties and changing the values to make the fuzzes look different from each other. They can only share ONE property value in common.
For example, your first fuzz might have green fur, but for your second fuzz, you should change the color value to be something new!
When you are done, double check your work. Every line of code for the two fuzzes should be different except one. When you’re done, compare your two fuzzes. Do your fuzzes share the same properties? How are they similar? What values did you choose that makes your fuzz’s properties look different? Your fuzzes can share one line of code - make sure you identify which one it is.
Good luck on your coding mission!