Lab 00 Exercise
Lab 00 Exercise
Programming
CT803-4-0-OIVIP
Lab Week 1
Introduction to Microsoft Teams and the Snap! Environment
Exercise 1
• Make a sprite move across the screen: A sprite is a graphical object that you can
control with code. To make a sprite move, you need to change its x and y
coordinates. You can use the move block to move the sprite by a certain number
of steps, or the go to x: y: block to move the sprite to a specific location. You can
also use the forever block to repeat an action indefinitely, or the repeat block to
repeat an action a certain number of times. Make the sprite move from one edge
of the screen to the other, and then back again. You can also change the sprite's
costume, direction, or size to make it more interesting.
• Make a sprite say something: You can use the say .. for .. secs block to make a
sprite say a message for a certain amount of time. You can also use the ask block
to make a sprite ask a question and wait for an answer. Make a sprite say hello,
ask the user's name, and then say something nice about them.
• Make a sprite change its color: You can use the ‘set color effect to’ block to change
the color of a sprite. The color effect is a number that represents the hue of the
sprite, from 0 to 100. You can also use the ‘change color effect by’ block to change
the color effect by a certain amount. Make a sprite change its color gradually, or
randomly.
• Make a sprite bounce off the edges of the screen: You can use the if block to check
a condition, and the touching block to check if a sprite is touching something. You
can also use the turn block to turn a sprite by a certain angle, or the point in
direction block to point a sprite in a specific direction. Make a sprite move around
the screen, and bounce off the edges when it touches them. You can also make
the sprite bounce off other sprites, or make sound effects when it bounces.
• Make a sprite follow the mouse pointer: You can use the mouse x and mouse y
blocks to get the x and y coordinates of the mouse pointer. You can also use the
point towards block to make a sprite point towards another sprite or the mouse
pointer. Make a sprite follow the mouse pointer wherever it goes. You can also
make the sprite change its speed, size, or costume depending on the distance
from the mouse pointer.