Thursday, August 23, 2018

Unit 1 Essential Questions

Why is computer science relevant?
Computer science is relevant because of the widespread influence of computers in modern technology. Most, if not all, fields of work take advantage of computers to improve their efficiency, speed, and overall increase in production. Aside from work, the daily life of people today is heavily involved in computers. Commonplace things like the Internet, social media, GPS, and cars are results of computer science and computer improvements.

What does computer science involve and include?
Computer science involves the study of fundamental theories that make computers work. It is a broad topic that includes algorithms, data structures, programming, data and information, abstraction and more. In the end, computer science is like any other science in the sense that it generally advances our current technology and knowledge of the world.

What is computing innovation?
An innovation is a change or modification made to an already existing product  product, which can be to lower its costs, increase efficiency, or any other thing that improves the product. For example, a specific innovation made for computers is the Internet. The Internet allows for global connections between computers which greatly increased the amount of information that could be shared.

How does CS impact my area of interest?
Computer science impacts my area of interest directly because I want to become a programmer. I am considering software development and in order to create the best applications I possibly can, it would be important to first understand the details on how a computer works and any other information that studying computer science would give.

Wednesday, August 8, 2018

Snap! U2-Plural



Circle 1: First, it takes the word cabbage and keeps the same word except for the last letter. This leaves "cabbag". Then, the last letter of "cabbag", which is "g" is checked in the list. The letter g is not in the list so it reports false.

Circle 2: Each word in the list is put into the plural block and turned into plural versions of the original word.

Snap! U2-Mastermind


Circle 1: When the game is started, Player 2 is asked to make a guess and the guess variable saves the answer. Then Player 1 is asked how many colors are in the correct position and the correct position variable saves the answer.

Circle 2: The correct position number will switch to the right costume and stamp the number on the screen. The costume has plus 1 because the first costume is 0. If correct positions is 4 then Player 2 has guessed all colors correctly and the game ends.

Snap! U2O2-PinwheelWithRectangles


Circle 1: When the program is started, initialize all the variables to a default value.

Circle 2: A pinwheel is drawn but for each branch of the pinwheel, instead of just a line it is a rectangle. The inputs can be changed via sliders.

Snap! U2O1-Magic8Ball



Circle 1: When the green flag is clicked, initialize responses to a list of possible responses for the 8 Ball. The 8 Ball then tells to user to ask a question. When a question is asked a random response is given.

Circle 2: When the green flag is clicked hide the Asker. When the user asks a question the Asker is shown and says the question. After getting the 8 Ball's response hide the Asker again.

Snap! U2L4-TicTacToe


Circle 1: When the program starts, create the board and let X go first.

Circle 2: The makeBoard block points to the right and goes to top left. It creates a 3x3 grid by making a rows of squares. Each row creates clones of the Square sprite. After each row is complete it goes back to starting point and moves down to start the next row. After making the board the original Square is hidden so there are not 10 squares.

Snap! U2L4-FractalArt


Circle 1: The sprite draws a triangle by drawing a line and turning 3 times.

Circle 2: The nested triangle block draws a triangle, but for each triangle another triangle is drawn.

Snap! U2L4-BrickWall


Circle 1: The draw Brick Wall block starts the sprite in the top left and points to the right. If there is an even number of rows then it draw the wall normally.

Circle 2: If there is an uneven number of rows, the wall will be drawn with an even number of rows and then an extra row will be added to make it odd.

Snap! U2L3-WordPuzzleSolver


Circle 1: Import a list of words. Then check letters and length of each word from the words list.

Circle 2: Check if the last letters of a word are what you want.

Snap! U2L3-Predicates



Circle 1: When the program starts clear the screen and bring the pen up so nothing is being drawn. The sprite always follows the mouse and while the left click is being held it will draw. Depending on the y position the color changes.

Circle 2: The even? block checks whether that number is even or not by using the modulus operator to see if there is no remainder when dividing by 2.

Snap! U2L3-KeepingData


Circle 1: From the words list, only the words that are 5 letters long will be kept.

Circle 2: This block uses modulus operator to check the remainder of two numbers. The numbers will be divisible if there is no remainder and indivisible if there is a remainder.

Snap! U2L2-Mandala



Circle 1: After the program starts, it initializes the variables vertex and previous position to empty lists. The sprite points to the right and draws the mandala using the polygon block.

Circle 2: The polygon block takes 2 inputs of side and side length. The sprite draws the polygon and each vertex is added to the list of vertices. Then, for each vertex, the sprite will set that current vertex as the previous position. The sprite draws lines by moving to every other vertex while going back to the original vertex each time. This repeats for every vertex to draw the mandala.

Snap! U2L2-CapturingPoints


Circle 1: When the program starts it initializes the variable point list to an empty list and clears the screen. The sprite will follow the mouse until spacebar is pressed. Every time the user clicks, that position will be added to point list.

Circle 2: After the points are taken from point list, the shape the points make will be drawn.

Snap! U2L2-DrawShape


Circle 1: The variable A is set to a list of points that will makes the outline of "A".

Circle 2: The sprite will go to each point in the list of A so that it draws the shape of "A".



Snap! U2L1-NumberGuessing



Circle 1: In the Number Guessing Game block it initializes the two script variables secret number and answer. The secret number is picked at random from 1 to 10. The answer is first set to 0 so that answer never starts equal to the secret number, otherwise the game would end there.

Circle 2: The sprite asks the user to guess a number. If the guess is too big or too small the sprite tells the user that. When the user guesses the correct number the sprite will congratulate the user and the game ends.

Snap! U2L1-ClickAlonzo


Circle 1: When the program starts, initialize the score variable to 0 and set ghost effect to 0 so Alonzo is fully visible. Then make Alonzo welcome the user.

Circle 2: When Alonzo is clicked, the score and ghost effect increase. Alonzo becomes less transparent and randomly moves to a location every second. After 10 clicks, the user wins and the game is over.

Snap! U1O4-Daisy


Circle 1: When the program starts clear the screen and put the pen down to draw.

Circle 2: The sprite will draw a 30-sided polygon. After each polygon the sprite goes back to center and rotates. 24 polygons are drawn to make the daisy.

Snap! U1O3-Pong
























Circle 1: When starting the program, the Paddle will go to right edge of the screen. It moves up and down when the up or down arrow keys are pressed.

Circle 2: The Ball starts in the middle and points in a random direction. The ball will continuously move and bounces off the edges and the Paddle when the two sprites touch.

Snap! U1O2-Clock


Circle 1: The seconds hand will turn to the point to the current second. 360 is divided by 60 to make 60 equal turns since there are 60 seconds in a minute.

Circle 2: The hour hand will turn to point to the current hour. 360 is divided by 12 to make 12 equal turns since there are 12 hours on the clock.

Snap! U1O1-EtchASketch



Circle 1: When you start the program its puts the pen down to draw and makes the pen color black. The drawings can be cleared with spacebar.

Circle 2: When any arrow key is pressed, the sprite will turn in that direction and move.


Snap! U1L5-SpriteChase


Circle 1: The sprite will follow the mouse around when the green flag is clicked until it touches Sprite(2).

Circle 2: After the two sprites touch, Sprite says "What did you have for dinner yesterday?" and Sprite(2) says "I had steak and salad."

Snap! U1L5-Squiral



Circle 1: For each number from 0 to 30, the sprite will say the number if it is divisible by 2.

Circle 2: The sprite goes to the center and draws a spiral shape by repeatedly drawing a line and turning.

Snap! U1L3-Pinwheel


Circle 1: The pinwheel block takes 3 inputs of number of branches, the size of the branches, and the size of the backup. The sprite will draw a pinwheel shape by moving forward and backwards to draw lines depending on the inputs. To make sure the shape closes perfectly, 360 degrees of rotation are divided by the number of branches to make each branch turn an equal amount of degrees.

Circles 2: The polygon block uses the pinwheel block except with 0 back up. If the sprite does not back up it will draw the branch and continue to the next branch without moving backwards. This draws a normal polygon.

Snap! U1L2-GreetPlayer



Circle 1: The sprite asks the user what their name is and waits for a response. If the list of names contains the what user answered, the sprite will say "Nice to see you again," and the user's name like they have met before.

Circle 2: If it is a new name not in the list, the sprite greets them like a new person and adds the name to the list.

Snap! U1L2-Gossip


Circle 1: The who block selects a random noun from a list.

Circle 2: The gossip block creates a sentence using random words from the who and does what blocks.

Snap! U1L1-ClickAlonzo



Circle 1: When the program starts the sprite will be fully visible with no ghost effect and welcome the user.

Circle 2: Every time the sprite is clicked it becomes less transparent, face the other direction, and then goes to a random location.

Scratch 8



Circle 1: When the Watermelon sprite receives the Launch message it will be thrown up on screen uncut. If the webcam detects enough motion on the Watermelon it will switch costumes and appear cut in half. After, it broadcasts the Start message so the game can continue.

Circle 2: When the Watermelon gets the Launch message and it is picked by Launch Pick, the Watermelon will be randomly thrown on screen. A random location will be picked and if the location is on the left, the Watermelon will be thrown to right. The opposite will happen if the location is on the right. It is thrown with a random speed and angle for variation.

Scratch 7


Circle 1: While the program is running, it checks what the Gravity variable is equal to. This controls what direction Flappy Bird will face. When Gravity is zero the bird will point right, downwards when Gravity is negative, and upwards when Gravity is positive.

Circle 2: When the spacebar is pressed, the bird will jump up by setting Gravity to 3.

Scratch 6



Circle 1: When you start the program the Beetle sprite will always check if it is touching the Ball sprite. If the Ball and Beetle touch the Score increases by 1, plays a sound, and switches costume so the beetle will face downward. While it faces downward, it will fall down the screen and send out the Go message after reaching the bottom.

Circle 2: After receiving the Go message, the LaserPower variable is initialized to 7 so the user can shoot up to 7 balls. The Beetle will randomly appear from either the left or right side of the screen. Then, the Beetle will move across the screen until it is hit by the Ball or reaches the edge of the screen. If Beetle touches the ball the game continues and if it reaches the edge the game ends.

Scratch 5


Circle 1: When the program starts, initialize X Velocity variable to 0 so the sprite is not moving. If the left arrow key is pressed then the sprite will speed up and move left until it reaches a limit of 7. This stops the sprite from infinitely accelerating. While the left key is not being pressed it will lose speed and decelerate. 

Circle 2: Initialize the Gravity variable and continuously decrease it by 1.

Scratch 4



Circle 1: Any time the car touches the color green as it goes around the track it will rotate many times to simulate spinning out. After it spins out it will not spin again until the car goes back on the track and touches the green another time.

Circle 2: Every time the program starts initialize the laps variable to 0. The car will complete a lap after it has gone around the track and touches the starting line. After 2 laps are completed game will end.

Scratch 3


Circle 1: When the program starts the monkey will show up on a basketball court and greet the user by asking for their name. Then, it replies with "Hello!" and whatever the user entered. After, it asks for the capital of New Jersey and keeps asking until the user answers correctly. When the user answers correctly, then the second question will be asked.

Circle 2: After answering all the questions correctly the monkey will forever change costumes so that it looks like a dancing animation.

Scratch 2


Circle 1: When the green flag is clicked to start the program, the crab sprite will show up and always glide from the top of the screen to bottom in random locations.

Circle 2: This initializes the Score variable to 0 each time the program is started and every time the crab and black ball touch, the crab will become hidden, increase the score, and play a sound.

Scratch 1



Circle 1: When the green flag is clicked it will start the program and make the pen size 10 pixels. Next put the pen down so as the sprite moves it will draw.

Circle 2: The sprite will draw the base of the house in green and then the roof in red. This repeats until the program is stopped.