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. 

How the interrupt mechanism works

Thus far it is possible that we’ve made the assumption that a process usually runs to completion and then the OS runs other processes. As indicated in our process management note/discussion we now know this to be false.

It is possible for an OS to be implemented as a timing mechanism, switching between each process after say 100 instructions being executed. In theory, this is a good first approach if all instructions are executed in  a very short and equal timeframe.

Below, we  represent how this can be accomplished by observing what the cpu processes assuming each instruction takes about 1 second for 2 processes, P1 and P2:

Order of executionProcess/operation categoryInstructions executedTime taken (s)
1I/OI/O for OS and P12
2P1100 lines from P1100
3I/OI/O for OS and P22
4P2100 lines from P2100
. . . . .. . . . .. . . . .. . . . .
501I/OI/O for OS and P12
502P1100 lines from P1100
503I/OI/O for OS and P22
504P2100 lines from P2100
. . . . .. . . . .. . . . .. . . . .

In practice though, a single instruction from a running process can  be waiting or very long, such as when the instruction requires data be read from a secondary storage medium.  Data access on secondary storage is very slow.  Let us assume that P1 has  a few instructions that require some data access. Our table now becomes:

Order of executionProcess/operation categoryInstructions executedTime taken (s)
1I/OI/O for OS and P12
2P1100 lines from P11500
3I/OI/O for OS and P22
4P2100 lines from P2100
. . . . .. . . . .. . . . .. . . . .
501I/OI/O for OS and P12
502P1100 lines from P11200
503I/OI/O for OS and P22
504P2100 lines from P2100
. . . . .. . . . .. . . . .. . . . .

We observe in this analogy that p1 runs for a total of 1502 seconds P2 for 102, P1 for 1202 seconds, P2 for 102 seconds.

To the end user, It appears as if BOTH processes are running slowly, in the long run, p2 can appear to be running in slow motion!

To solve this problem, we could use a system of interrupts, i.e, interrupt the CPU whenever we anticipate a waiting period (for whatever reason I/O, system errors, device errors etc.)

In our analogy, every time P1 needs to wait on data from secondary access, we could put the rest of P1 in a waiting/blocked state and start processing P2.  When the hardware is finished gathering the data for P1, it could interrupt the execution of P2 and return control to P1.

Omitting IO from the OS, An illustration of this example is shown below:

(Assume that instructions for p1 are executed in 1 second intervals until an instruction needing secondary data access is reached)

P1’s instruction include:

49 short instructions then,

1 long access instruction then,

24 short instructions then,

1 long access instruction, then

25 short instructions

Order of executionProcess/operation categoryInstructions executedTime taken (s)
1P150 lines from P150
2OS(P1 Blocked),
3P2100 lines from P2100
4P2100 lines from P2100
5P2100 lines from P2100
6P250 lines from P2, interruption occurs50
7P125 lines from P125
8OS(P1 Blocked),
9P250 lines from P250
10P2100 lines from P2100
11P2100 lines from P2100
12OSInterruption occurs to return accessed data to P1
13P125 lines from P125
14P2100 lines from P2100
. . . . .. . . . .. . . . .. . . . .

We now observe both processes running efficiently with no excessive wait times.

Exercise
  1. What is the total wait time for P1 and P2 Respectively?
  2. Which process had the more instructions executed?

© 2022  Vedesh Kungebeharry. All rights reserved. 


  •