How to download an attachment from a google classroom post (Naparima College)

See the short demo on how to download an attachment from a google classroom post (Naparima College)

Steps:

  1. Click on the attachment
  2. click the 3 vertical dots and choose “Open in new window”
  3. The download button now becomes available in the new window, Click on it.
  4. The file will be automatically downloaded. To see your recent downloads , press Ctrl+J

© 2023  Vedesh Kungebeharry. All rights reserved. 

The Main Purpose Of the Operating system

The hardware components of a computer will not operate on it’s own due to  the nature of it’s design. 

Computers are designed to be instructed by software.

The operating system is the software just above the firmware level which provides a user interface to the user so that they may indirectly interact or command the hardware. The OS manages hardware resources that must be used by the various running processes of the computer system.

Discussion:

Consider the feedback loop where the user attempts to print a word processing document

-Graphics on screen

-application software

-what happens if 2 apps need to print at the same time?

Thinking about the operating system as a Resource Manager

The OS mainly manages  :

  • Memory
  • Input and output operations (I/O operations)
  • The processor
  • The user interface

© 2023  Vedesh Kungebeharry. All rights reserved. 

2022 U2 Q1

Part a)

The main difference between a stack and a queue is how data is inserted and removed from each of them. In a stack, the last element inserted is the first to be removed as compared to a queue where the first element inserted is the first to be removed.

Part b) i)

The enqueue(element) adds an element to the end of  the list of elements which represent the queue. If the list of elements is empty, it adds it at the first location or head of the queue.

Part b) ii)

The dequeue(element) removes an element to the front of  the list of elements which represent the queue. If the list of elements is empty, no element is removed.

Part c)

//Assumptions: The following state is used
#define MAX_SIZE 100
int stack[MAX_SIZE];
int top = -1;

void push(int *stack, int value) {
    if (top >= MAX_SIZE - 1) {
        // Stack is full
        printf("Stack is full, element was not added!\n");
        return;
    }
    top++;
    stack[top] = value;
}

© 2023  Vedesh Kungebeharry. All rights reserved. 

Cat Crossing the Street! (Activities involving 2 persons)

01 Initial Setup

Let’s create a scenario for a cat crossing the street!

  • Cat: “Hey, I’m gonna cross the street
  • Dog: “Wait”
  • Cat: “What?”
  • Dog: “Look both ways before you cross”
  • the cat looks left
  • the cat looks right
  • Cat: “Crossing now”
  • The cat crosses the street



Guided instruction to implement this scenario in Scratch

  1. Open Scratch and create a new project.
  2. Select the “urban” backdrop by clicking on the “Choose a backdrop from library” button below the stage and choosing the “urban” backdrop.
  3. Add the “dog2” sprite by clicking on the “Choose a sprite from library” button below the stage, selecting the “Animals” category, and choosing the “dog2” sprite.
  4. Resize both sprites to a size of 50 by clicking on the sprite and using the “Size” block in the sprite’s code.
  5. Position the dog sprite on one side of the street and the cat sprite on the other side as shown in the image provided. You can drag the sprites to the desired positions.
  6. Horizontally flip all costumes for the dog sprite so that it faces to the left. To do this, click on the dog sprite, go to the “Costumes” tab, select each costume, and use the “Flip horizontally” button.
  7. Copy the first costume of the cat sprite and place it in the third position. To do this, click on the cat sprite, go to the “Costumes” tab, select the first costume, and click on the “Duplicate” button. Then drag the duplicated costume to the third position.
  8. Horizontally flip the third costume of the cat sprite. To do this, click on the cat sprite, go to the “Costumes” tab, select the third costume, and use the “Flip horizontally” button.

Now you have set up the sprites and costumes for the cat crossing the street scenario in Scratch. You can continue by adding scripts to animate the sprites and make the cat look left and right before crossing the street.

Video Tutorial

Follow along with the video below:

https://youtu.be/q4TzNKMy63s

Suggested solution

Scratch project: https://scratch.mit.edu/projects/848541187

For our Sprite 1 (Cat)

02 Sprite1 Code (Cat)

For Our Dog2

03 Dog2 Code

© 2023  Vedesh Kungebeharry. All rights reserved.