Computer science

You will be creating a game of Rock-Paper-Scissors in program called Scratch. Scratch is a visual programming language created by MIT for the purpose of learning programming. It touches on many of the basic concepts in popular programming languages used today, such as C, C++, Java, and Python.

This assignment will be out of 1000 possible points.
Getting started:

Download the Scratch installer from the CMPE 3 eCommons “Resources” link, and install.
Read through the brief Concepts Covered and Overview of Scratch sections below.
For more help, check out these two fully-functional Scratch program examples by right-clicking on the links and selecting “Save link as…”. Then open them on your computer.
Number Guessing Example
Why Did the Fish Cross The Road Example
For more explanation about these examples, check out the Descriptions of Examples at the end of this page.
Download and open the skeleton starter file by right-clicking on the link and selecting “Save link as…”. Then open it on your computer.
Rock-Paper-Scissors Skeleton
This is your starter file for this assignment.
It contains some pre-designed sprites and scripts to help you get started.
Ignore all chunks of scripts that begin with “When [green flag] clicked”. These are just there to reset your game when you click the green flag in the upper right of the window.
Follow the Assignment Requirements to complete this assignment.
Concepts Covered:

sprites – These are the basic objects in Scratch that can contain scripts, costumes, and sounds associated with them. This assignment will have 3 sprites: Computer, Player, and Go button. Sprites roughly represent “objects”, a fundamental concept of object-oriented programming languages (such as C++ or Java).
costumes – These are images that are associated with a sprite. In this assignment, the Player sprite and Computer sprite will have rock, paper, and scissor costumes. The Computer sprite will have an additional question mark costume. The Go button sprite only has one costume, a green go button.
variables – This is a fundamental concept of computer programming. A variable can contain anything (a number, word, sentence, etc.) that can be stored and used later in the program.
conditionals (such as “if” or “if/else” blocks) – This is another fundamental concept of programming. Conditionals are necessary when comparing the moves of the Player and Computer, and making a decision about who wins or loses.
loops (such as “while” or “for” blocks) – This is another fundamental concept of programming (that might not be necessary in this assignment). Loops allow parts of a program to run multiple times. Loops are often controlled by conditionals and variables.
printing (such as “think” or “say” blocks) – This is a basic feature in most programming languages (not to be confused with printing paper from a printer). Printing basically means displaying words on the computer screen (i.e. printing the words “Player wins!” to the screen if the player wins). In Scratch, this is done by using the “think” or “say” blocks.
delays (such as the “wait” block) – Sometimes the speed at which scripts run is too fast to see the results. Parts of the script can be paused or slowed down by using “wait” blocks. For example, switching to a costume, and then a 2nd costume, can occur too quickly to see. So by placing a “wait 1 second” block in between, you can see the first costume for 1 second before it switches again.
random numbers – A random number block can generate a random number between any two numbers (ex. a random number between 1 and 10).
broadcast messages – Broadcasts let sprites communicate with each other by sending out a message to all other sprites, allowing any other sprite to respond (ex. when the go button is pressed, it broadcasts a message to the computer to select a new random costume). Broadcasts roughly represent the concept of “calling” a function, a fundamental concept of many programming languages.
Overview of Scratch:

The idea behind creating programs in Scratch is to drag and drop blocks you want to use from the Code blocks window into your Scripts window. There are several menus and windows that are important to understand, and they are illustrated in the image below. Blocks/scripts can be rearranged within the Scripts window by dragging the top block wherever you want (all blocks attached under the top block move as one). A white line appears when inserting a block in-between blocks, letting you know where it’ll insert.
TAKE ADVANTAGE OF OUR PROMOTIONAL DISCOUNT DISPLAYED ON THE WEBSITE AND GET A DISCOUNT FOR YOUR PAPER NOW!