What do these scratch programs draw? – Solutions

Draw the shapes from the following snippets of scratch code:

Exercise 1

pen down
repeat 4
    move 100 steps
    turn right 90 degrees
end repeat    

Solution: https://scratch.mit.edu/projects/700717121

https://upload.wikimedia.org/wikipedia/commons/3/3e/Drawing_Exercise_1.png

Exercise 2

pen down
repeat 3
    move 100 steps
    turn right 120 degrees
end repeat

Solution: https://scratch.mit.edu/projects/700720654

https://upload.wikimedia.org/wikipedia/commons/c/c6/Drawing_Exercise_2.png

Exercise 3

pen down
repeat 3
    move 200 steps
    repeat 2 
        turn right 120 degrees
        move 200 steps
    end repeat
    repeat 2 
        turn left 120 degrees
        move 200 steps
    end repeat
    turn right 120 degrees
end repeat

Solution: https://scratch.mit.edu/projects/700721746

https://upload.wikimedia.org/wikipedia/commons/1/1f/Drawing_Exercise_3.png

Animated solution:

https://upload.wikimedia.org/wikipedia/commons/a/a1/Drawing_Exercise_3_-_Animation.gif

Solution with more pauses: https://scratch.mit.edu/projects/638143905

© 2022  Vedesh Kungebeharry. All rights reserved. 

What do these scratch programs draw?

Draw the shapes from the following snippets of scratch code:

Exercise 1

pen down
repeat 4
    move 100 steps
    turn right 90 degrees
end repeat    

Exercise 2

pen down
repeat 3
    move 100 steps
    turn right 120 degrees
end repeat

Exercise 3

pen down
repeat 3
    move 200 steps
    repeat 2 
        turn right 120 degrees
        move 200 steps
    end repeat
    repeat 2 
        turn left 120 degrees
        move 200 steps
    end repeat
    turn right 120 degrees
end repeat

© 2022  Vedesh Kungebeharry. All rights reserved. 

Scratch – Selection, Sensing, Repetition, Outputting Results.

Task 1

Create a solution in scratch which accepts a mark from the user and outputs whether or not the mark is a pass or a fail. Assume the pass mark is 50.

Solution: https://scratch.mit.edu/projects/699663431

Task 2

Modify your solution above to keep on prompting the user indefinitely and keep track of the number of marks entered.

In the above scenario, we add:

  • a forever block to achieve indefinite/infinite repetition
  • a variable to keep track of the number of marks, numMarks
  • the join operator to output results

© 2022  Vedesh Kungebeharry. All rights reserved. 

Selection and Iteration exercise

Task: Create a solution which accepts 10 temperatures in Celsius and outputs “it is hot” if the temperature is greater than 30 degrees, otherwise output “it is cold”

Solution

See flowgorithm files here:

https://drive.google.com/drive/folders/1lvuR4sNPoV8ZfWN_GPL1DnZewjNm3bES?usp=sharing

Flowchart

Source: https://upload.wikimedia.org/wikipedia/commons/3/3a/Looping_and_Selection_Exercise.png

Pseudocode

Start
    // Task: Create a solution which accepts 10 temperatures in Celsius and outputs "it is hot" if the temperature is greater than 30 degrees, otherwise output "it is cold"
    // 
    // Start Declaring Variables
    // End Declaring Variables
    // Start Variable Initialization
    // 
    counter = 1
    maximum = 10
    currentTemperature = -999.99
    
    // End Variable Initialization
    // 
    loop while counter <= maximum
        output "Please enter temperature value #" + counter
        input currentTemperature
        if currentTemperature > 30 then
            output "it is hot"
        else
            output "it is cold"
        end If
        counter = counter + 1
    end while
    output "Ending program"
end 

© 2022  Vedesh Kungebeharry. All rights reserved. 

Scratch: Drawing a Square, Square Variable exercise

Demo:
1. Visit Scratch.mit.edu or open scratch version 3
2. Add the pen addon to the scratch project
3. Experiment with the blocks that use the pen
4. Draw a square of side 50 units

Scratch Demo: https://scratch.mit.edu/projects/650520375

Video Demo:

Task: Prompt the user to enter a value and store it in a variable called “Side”. Proceed to draw a square with a length of side equal to “Side”. (Assume the user enters a size that can fit in the stage area.)

© 2022  Vedesh Kungebeharry. All rights reserved. 

Presentation Software – Classroom Instructions

Main Content:

1) Read the information found here: https://islandclass.wordpress.com/2020/08/20/presentation-software/

2) Follow the video tutorial found here: https://islandclass.wordpress.com/2020/09/16/video-series-using-powerpoint-presentation-software/

Further Additional Content:
______________________________________________________________________________

The ministry of education has provided the following task and youtube videos:

https://support.microsoft.com/en-us/office/create-a-presentation-in-powerpoint-422250f8-5721-4cea-92cc-202fa7b89617

INSTRUCTIONS FOR STUDENTS


1) Follow the instruction from above until “Saving” (Information from first link: https://support.microsoft.com/en-us/office/create-a-presentation-in-powerpoint-422250f8-5721-4cea-92cc-202fa7b89617 )”

2) View the videos (Posted above) :
https://www.youtube.com/watch?v=Q8hJvppObGQ
https://www.youtube.com/watch?v=fzuHplbKD9A

3) Print your presentation (This step is optional)

______________________________________________________________________________
Text book resources:

JUST CLICK 3RD EDITION

Just Click 3rd Edition pg 92 to 97
Just Click 3rd Edition pg 98 to 99 (optional)

COMPUTING STUDENT BOOK 3
Oxford International Lower Secondary Computing Student Book 3 , Chapter 5

© 2022  Vedesh Kungebeharry. All rights reserved. 

Group Project – Create a Game in Scratch!

Using Scratch Online, create a game on a topic of your interest. Please include the following:
1. Name of the game 1 mk
2. Instructions on how to use the game 1 mk
3. Good use of color and stage area 1 mk
4. Moving a sprite with the keyboard / mouse 2 mks
5. At least 1 loop (e.g. using the forever or repeat block) 2 mks
6. At least 1 If block (e.g. using an If block) 2 mks
7. At least 1 Variable (e.g. score) 2 mks
8. At least 1 Sensing block 2 mks
9. At least 1 Say block 2 mks

-SUBMIT A WORD PROCESSING DOCUMENT WHICH CONTAINTS THE INSTRUCTIONS AND A LINK TO THE GAME
-Keep all work PG13
-ONLY GROUP LEADERS ARE ALLOWED TO SUBMIT

See the video as a general guide on submission instructions. (Recorded previously on 2022-

© 2022  Vedesh Kungebeharry. All rights reserved. 

Spreadsheet Assignment 1

Excel File

1. Download the attached Excel file and complete the tasks listed in the sheet TUTORIAL TASKS. The Tasks are to be completed in sheet 1. Note, these tasks must be accomplished in Microsoft Excel and not google sheets. (SEE ATTACHED VIDEO INSTRUCTIONS).

2. After accomplishing the tasks, save your work.
3. Rename your File in the format “Last name, First name – Excel Exam”

3. Attach this file to to assignment and turn in your  submission before the deadline date.

Video instructions

https://youtu.be/YWw4rJDwKv0

© 2022  Vedesh Kungebeharry. All rights reserved. 

NCSE ICT – Scratch Programming – Creating interactive sprites

In this example, we create a sprite which asks for you to enter a subject mark and tells you the grade.

Grade ranges are shown below:

A76 to 100
B50 to 75
C40 to 49
DFail

We will be using a variable to store the users input.

Also, we will used some “if” blocks and logical operators to produce the grade.

See the blocks in the project below:

https://scratch.mit.edu/projects/629271195

Exercise

If someone enters an erroneous mark, e.g 1000 , the program dosen’t say anything to the user.

Copy or remix the project and Add blocks to say “you’ve entered an incorrect mark” if the user enters a mark higher than 100 or a mark less than 0.

(Hint: an IF block and an OR logical operator may be useful for solving this problem!)

© 2022  Vedesh Kungebeharry. All rights reserved.