Algorithm Solution: Using Computational Thinking to solve a Math problem


This is the solution and feedback for the problem blogged@ https://islandclass.org/2018/05/25/using-computational-thinking-to-solve-a-math-problem/

Solution

Algorithm:
1. Start
2. Start with N numbers
3. Determine the number of pairs, p = N/2
4. Find the sum of the first and last number , AL=  Fn+Ln
5. Calculate sum, Sum =  p* AL
6. Present the Sum.
7. Stop

© 2024 islandclass.org

Simple Sorting, Subsorting Tutorial.

Step 1: Create Sample Data

First, we will create a sample dataset. We have a list of students with their names, grades, and scores.

Step 2: Enter Data in Excel

Open Excel and enter the following sample data into a new worksheet:

NameGradeScore
John SmithA99
Jane DoeA92
Mike BrownB88
Lisa RayA95
Tom HanksA98
Rita OraC55
Gary OldB82
Tina FeyC55

Step 3: Sorting Data

To sort the data:

  1. Click on any cell in the column you want to sort by (e.g., Grade).
  2. Go to the Data tab on the Excel ribbon.
  3. Click on Sort A to Z (ascending order) or Sort Z to A (descending order).

Step 4: Subsorting (Multi-level Sorting)

Subsort the data by Grade, then by Score, and finally by Name:

  1. Select any cell in the data range.
  2. Go to the Data tab on the Excel ribbon.
  3. Click on the Sort button to open the Sort dialog box.
  4. For the first level, choose Grade from the Sort by dropdown, select Values in the Sort On dropdown, and choose A to Z for the order.
  5. Click Add Level to add a second sort condition.
  6. For the second level, choose Score from the Then by dropdown, select Values in the Sort On dropdown, and choose  Largest to Smallest for the order.
  7. Click Add Level again to add a third sort condition.
  8. For the third level, choose Name from the Then by dropdown, select Values in the Sort On dropdown, and choose A to Z for the order.
  9. Click OK to apply the multi-level sort to your data.

Step 5: Review Sorted Data

What happens when 1 student has the same grade and score as another?

Sample Data

Download a file containing the sample data here:

https://drive.google.com/drive/folders/1JXTLenz8FvsX9GijfMCKkGCzQfnrlkS5?usp=drive_link

Updates to this post

2023/11/17 – Changed values for score to make the example more reasonable.

© 2023 islandclass.org

Simple Chart Exercise / Tutorial (With Solution)

Simple Chart Exercise Tutorial (With Solution)

Task:

Create a bar chart which compares the income, expenses, and profit for the first four months of the year.

Setup a table as shown below with values of your choosing create the chart:

IncomeExpensesProfit
Jan
Feb
Mar
Apr

Tutorial (TA-Note)

Creating the Table:

  1. Open Excel.
  2. Click on “Cell A1” and type “Month”.
  3. Starting from “Cell A2” downwards, type the months: Jan, Feb, Mar, and Apr.
  4. Click on “Cell B1” and type “Income”. Similarly, fill in “Cell C1” with “Expenses” and “Cell D1” with “Profit”.
  5. You now have your table headings ready. You can enter your data in the cells below each heading.

Creating the Bar Chart:

  1. Select the Data: Click and drag to select the cells from A1 through D5 (assuming you have data entered till the April row).
  2. Insert a Bar Chart:
    • Go to the “Insert” tab in the Excel ribbon.
    • In the “Charts” group, click on the “Column or Bar Chart” icon (it looks like a column/bar chart).
    • A drop-down menu will appear. Choose the first option under “Clustered Bar” or any other bar chart type you prefer.
  3. Adjusting the Chart (Optional):
    • Click on the chart. This will reveal three new tabs in the ribbon: “Chart Design,” “Format,” and a third contextual tab related to the type of chart.
    • Use the “Chart Design” tab to quickly adjust the chart’s layout, style, and other elements.
    • Use the “Format” tab to refine the chart’s appearance further.
  4. Title & Labels:
    • By default, Excel might add a title, axis labels, and a legend. You can click on these elements to edit them.
    • To add labels or other elements, right-click on the chart and select the desired option from the context menu.
  5. Once satisfied with the appearance and data representation of the chart, you can save your Excel sheet.

Solution

See the attached excel file:

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

© 2023 islandclass.org

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 islandclass.org

SD Card Reader

SD Cards (Secure Digital Cards) are a popular form of portable flash memory storage because of it’s small size , speed and durability. It’s used widely in digital video/photography to store media, and as expansion storage for other smart devices including phones , tablets etc.

It was created by a group of companies and has now become a standard for portable data storage.

SD Cards

SD Card readers are devices that allow for SD Cards to be read by the computer system and can be internal (built into) or externally connected via USB ports.

Below: An external SD Card Reader with an inserted Micro SD Card

SD card reader

Below: An internal SD Card Reader built into the computer’s system unit.

Toshiba Satellite S40t laptop - SD card reader - 10086954974

Why are SD Card Readers needed?

Because of it’s widespread use, it has become desirable to include SD card readers in newer computer systems to facilitate easier data transfer from device to device.

A common task that a user would face would be copying their media from their digital camera to their pc. In the past, this meant that the user would have to install the camera’s software and drivers on the pc, then connect a cable from the camera to the pc to access the media.

This process changes when a sd card reader is built in or connected to a computer, the user simply removes the sd card from the digital camera and inserts it into the sd card reader, where the media is immediately accessible as using any other portable secondary storage device.

Attributions to media used in this post

Original: 毛抜きDerivative work: Tkgd2007, CC BY-SA 3.0, via Wikimedia Commons

Dineshkumar Nallaveerappan, CC BY-SA 4.0, via Wikimedia Commons

liewcf, CC BY-SA 2.0, via Wikimedia Commons

© 2023 islandclass.org