GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing minecraft.makecode.com — Activity: Chicken Storm Activity: Chicken StormIn this activity, students use a variable to determine the number of chickens to spawn in Minecraft, and they’ll make these chickens fall from the sky like a storm of chickens! Do the activityMake a new project
We want more chickens!You want more chickens, of course, and you want to use a variable that will allow you to easily change the number of chickens. You can provide the number of chickens when you call the
It is good coding practice to give variables meaningful names.
Now if you enter chickens 15 in the chat window, the variable ChallengesNow you can change some things to make your own different and unique situations! Challenge 1 - Rename num1 to Something More MeaningfulLet's change the code so that you are not using To do this, you will need to...
When you are done, everything should work the same as before, but now you can read your code a little more easily. Remember that the search is your friend. Use your instincts, decide what you want to accomplish, and search for those things. See what you find! Challenge 2 - Give FeedbackLet's have your chicken rain machine speak back to you. This will be kind of like ordering at a drive-through window. Right before chickens start falling, have your code say " So if you entered chickens 5 in the chat window, the response would be, "5 chickens! Coming right up!". Then five chickens would fall from the sky on your head. To do this, you will need to...
ExperimentsHere there are no rules... Copy the code for the experiments and change things around to see what kind of results you can create. Suggestions are given, but do as you like! Experiment 1 - Default Chicken ValueNow that you have created a chicken command that takes a number variable and produces that many chickens, it is good programming practice to make sure to handle cases where the chickens command in the chat window isn't given a number. By default, Use this code to start with. How can you change this code? Maybe you do something interesting if the user types a certain number. For example, if the user types 20 in the chat window ( Experiment 2 - Chicken StormYou can further improve the realism of the chickens command by using the Use this code to start with. Try this out with other animals or objects. |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |