Alice - Learning To Program with Alice Chapter 9 Solution
Need help with Monty game in Alice programming on page 285. Here is the problem: A famous mathematical problem (the Monty Dilemma) goes something like this: Suppose you’re on a game show, and you’re given the choice of three doors. Behind one door is a car, behind the others, toy monkeys. You pick a door, say number 1, and the host, who knows what’s behind the doors, opens another door, say number 3, which has a toy monkey. He says to you, “Do you want to pick door number 2?” Is it to your advantage to switch your choice of doors? One way to find an answer to this question is to create a simulation of the game where the objects are placed randomly behind the doors. Play the game 25 times where you do not switch and 25 times where you do switch. Keep track of your success rate when you switch and your success rate when you do not switch. Then you will know the answer to the question! To set up the initial world, add three doors (Furniture), a car (Vehicles), and two toy monkeys (Animals) to a new world. Position the car and the two monkeys behind the three doors, as shown above. Each door should be 2.5 meters to the left (or right) of its neighbor door. Position the door in front of the car and then do the same for each monkey and its respective door. (When the door moves, the object behind will move with it.) Also create a 3D text object that asks the player to “Select a Door.” Make the text object invisible by setting its isShowing property to false.To program the game, make a list containing the three doors. When the animation begins, randomly pick two doors and swap them. Use a method called swap that takes two doors as parameters. Swap the two doors by having them move 2.5 meters in opposite directions. Important: Two doors should swap only if they are different (a door cannot swap places with itself). Repeat the swap 10 times. (The idea is to make it difficult for the player to know what object is behind what door.) Display the 3D text to ask the player to select a door. After the player clicks on one of the doors, pick another door that hides a monkey and open that door. Then ask the player whether he/she wants to switch the choice. If the object behind the door (selected by the player) is the car, the player has won. Open the door and declare the player a winner. Otherwise, the player has lost. Use sound or 3D text to indicate the winor loss.
Best free sites for learning how to write code CNET Learning how to code has never been easier. Whether you're a programming newbie or an old hand looking to learn a new skill or two, these four free services have you covered.
I am trying to build a PC as my current one is old and become very slow. I am a programmer mostly develop Web and Mobile applications. Please suggest a best PC configuration that works best. I'd like i7 and 16 GB RAM.
Hour of Code offers free computer programming demo. By Jessica Hayes. Updated: Wednesday, December 11, 2013, 6:27 AM EST; Published: Wednesday, December 11, 2013, 4:14 AM EST. (1/2)Test scores released this month show ...
Sharing your scoops to your social media accounts is a must to distribute your curated content. Not only will it drive traffic and leads through your content, but it will help show your expertise with your followers.
How to integrate my topics' content to my website?
Integrating your curated content to your website or blog will allow you to increase your website visitors’ engagement, boost SEO and acquire new visitors. By redirecting your social media traffic to your website, Scoop.it will also help you generate more qualified traffic and leads from your curation work.
Distributing your curated content through a newsletter is a great way to nurture and engage your email subscribers will developing your traffic and visibility.
Creating engaging newsletters with your curated content is really easy.