Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 2.05 KB

File metadata and controls

53 lines (32 loc) · 2.05 KB

What goes up

In this lab, you will use everything you've learned about loops and conditionals to construct a simple model for gravity.

Part 1: Before You Start

  1. Open https://aka.ms/Intro-lab3-2.

  2. Save your project as Lab3.2.

Part 2: Channeling newton

Write a script for the Dino sprite so that:

  1. When the green flag is clicked, Dino goes to the top of the stage.

  2. When the green flag is clicked, Dino falls to the bottom of the stage in a forever block.

  3. When Dino touches the ground, Dino stops falling.

When using the touching color block, change the color by clicking on the color box, then select anything in the color palette or stage that has the desired color.

Part 3: What goes up, must come down

  1. Modify your script so that when the green flag is clicked, Dino will move to the top of the stage and it will move to a random x-coordinate between -240 and 240. Use the pick random block in the scriptoperators category.

  2. Modify your script so that the Dino sprite stops falling when it touches the ground or it is touching the Platform.

Part 4: Jump up

  1. Modify your script so that when the spacebar is pressed, Dino will jump up.

  2. Have Dino jump by using a repeat block with a change in y block in it that will move Dino up. Dino will have to move up faster than you think since it will be fighting the forever block that causes it to always go down.

Part 5: Challenge

  1. Modify your script so Dino can only jump while on the ground or the platform?

  2. Add script so Dino will move left and right with the arrow keys?

Grading rubric

Criteria Points
2.1 Goes to the top of the stage 0.3
2.2 Falls to the bottom of the stage 0.3
2.3 Stops falling when touching the ground 0.3
3.1 To a random x-coordinate 0.2
3.2 Touching the ground OR touching the platform 0.3
4.1 Jump up 0.4
5.1 Jump Up: Ground or Platform 0.5
5.2 Movement using left and right arrow 0.2
Total 2.5