Using a pivot table to make sense of unknown data

When are pivot tables used?

Usually when we create an Excel document, we have an idea of the basic structure for data that is the types of tables we like to use on the charts we’d like to see.

It is interesting to note that a pivot table is not of much use when analyzing data that we have already atomized into various tables across our worksheet(s).

For example we’ve all seen sba’s that provide a summary for a budget for some event, or personal expenses. Because we have an understanding and an intent when we create the budget, we would have all the ready broken our data into tables that show income and expenditures which probably include actual values and estimated values. This data is already mostly summarized and it may be useless to apply a pivot table that gives us any additional insight to what we already know.

Pivot tables are most useful when we have:

  1. a large set of unknown or unfamiliar data.
  2. Data that has redundancy (data that is un-normalized)

In practice pivot tables are usually used on operational data that is highly detailed for atomized and recorded frequently.

Why are pivot tables used?

When we have a set of unfamiliar data we can use a pivot table to generate many intermediate summary tables that’s a low for us to start making sense of Trends in the data so that we may:

  1. Determine how best to structure the data and
  2. Make strategic decisions from what the data tells us

Demonstration Tutorial

Download the following file I follow along with the list of instructions that follow:

Select the range of data minus the headings from your original table:

Click on insert, recommended pivot tables:

Choose the second option:

We arrive at pivot table which summarizes our expenses:

Letters format the numerical data, using the regular number formatting options:

Demo: Constants, Variables and Datatypes.

Class Demonstration

See the video below:

https://www.youtube.com/watch?v=2iudU1eWcr8

Class Plan

Required reading: Information technology For CSEC examinations ,
3rd Edition Pgs. 265-267

Class demo in Flowgorithm:
Declare num1, Num2, assign, find sum.
Find the area of a circle based on the radius input by a user.

Teacher uses terminology in demonstration:
Declare, Identify, assign , initialize, Datatype

-Teacher shows how an algorithm can be generated to  store numbers input by the user.

-Teacher demonstrates how the variables can change

-Teacher demonstrates how integer variables
truncate real variables.(i.e int x = 5.7 results in x storing the value 5.)

Teacher shows how pi cannot be changed in
Flowgorithm.

© 2025  Vedesh Kungebeharry. All rights reserved. 

Videos: Computer Misuse

See the following objective content and related videos

These videos were chosen for each topic because they cover the subject matter in a relevant context. They definitely were not created specifically for the CSEC an Syllabus, however , they do address the fundamental concepts in real world scenarios.

(Created for CSEC syllabus, but some content also applies to NCSE ICT)

Syllabus ObjectiveContentSuggested Videos
2.                   assess the potential impact of computer systems misuse based on the main entities impacted; Misuse:
(a) Cyberbullying, copyright
infringement, data theft, denial of
service attacks,  transmission  of
viruses and malware, identity theft,
online publication of obscene
materials, phishing attacks, software
and music piracy, financial abuses,
violation of  privacy, propaganda,
electronic eavesdropping, industrial
espionage; and,
(b) Entity impacted: individual,
organization, government.
 Cyberbullying:
  Cyber Bullying (UNICEF)

How to Combat Cyberbullying | Child Mind Institute  

Copyright Infringement  

C&C B.1 What is Copyright Infringement, and Why Does it Matter?  

Data Theft
What Is Data Theft In Cyber Security? – SecurityFirstCorp.com
 
Denial Of Service Attacks  
DDoS Attack Explained in 2 Minutes

DDoS Attack Visually Explained

DDoS Attack Explained (Advanced )

Identity Theft   What is Identity Theft?    

Phishing attacks  

Funny Animation Video(Phishing Attack ) | Pencil animation | Short animated films (Set Induction)

What is Phishing?    

Software and music piracy  

Software:
Software Piracy | Animated Presentation (Set Induction)

The Impact Of Piracy

Music:
What is Music Piracy

Violation of  privacy  
What is an example of a data privacy violation?

Understanding “Privacy Violation”: A Simple Guide

What Is A Privacy Violation? – SecurityFirstCorp.com  

Propaganda  

What is propaganda and how can you spot it? | CBC Kids News

What is propaganda? | Jason Stanley | Explain It Like I’m Smart by Big Think     

Electronic eavesdropping   What Is Eavesdropping In Cyber Security

What Is Eavesdropping In Computer Security? – SecurityFirstCorp.com  

Industrial espionage
Industrial Espionage: The War on Information

What Is Industrial Espionage? – SecurityFirstCorp.com

When Chinese Industrial Espionage Goes Wrong  

© 2025  Vedesh Kungebeharry. All rights reserved. 

Ways of representing algorithms

There are several ways in which algorithms can be represented:

  1. Narrative form : An algorithm can also be represented using narrative form, such as English or another human language. This representation is often used to describe algorithms in a way that is easy for humans to understand, but it can be difficult to translate into a programming language.

  2. Pseudocode: Pseudocode is a way of representing an algorithm using a combination of natural language and programming language constructs. It is often used to represent algorithms in a way that is easy for humans to understand, but that can also be easily translated into a programming language.
  3. Flowcharts: A flowchart is a graphical representation of an algorithm that uses symbols to represent different parts of the algorithm, such as input, output, decision-making, and loops. Flowcharts are often used to represent algorithms in a way that is easy for humans to understand and visualize.

Narrative form

Narrative form is a way of representing an algorithm using a story or a sequence of events. This representation is often used to describe algorithms in a way that is easy for humans to understand, but it can be difficult to translate into a programming language.

For example, an algorithm for sorting a list of numbers could be represented in narrative form as follows:

  1. Start with an unsorted list of numbers.
  2. Compare the first two numbers in the list. If the first number is larger than the second number, swap their positions.
  3. Compare the second and third numbers in the list. If the second number is larger than the third number, swap their positions.
  4. Continue comparing and swapping pairs of numbers until the end of the list is reached.
  5. Repeat the process until the list is sorted in ascending order.

Here is an example of an algorithm in narrative form that explains the steps for using a menu system to withdraw money from an ATM:

  1. Start at the main menu of the ATM.
  2. Choose the “Withdraw” option from the menu.
  3. Enter the amount of money you want to withdraw.
  4. Confirm the amount of money you want to withdraw.
  5. If the ATM has enough money to dispense the requested amount, it will dispense the cash and return to the main menu. If the ATM does not have enough money, it will display an error message and return to the main menu.
  6. If you want to make another transaction, return to the main menu and choose a different option. If you are finished, choose the “Exit” option from the menu to end the transaction and return to the main menu.

Narrative form is often used to describe algorithms in a way that is easy for humans to understand, but it is not as precise as other forms of representation, such as pseudocode or programming language.

Pseudocode

Pseudocode is a way of representing an algorithm using a combination of natural language and programming language constructs. It is often used to represent algorithms in a way that is easy for humans to understand, but that can also be easily translated into a programming language.

Here is an example of pseudocode for calculating the simple interest on a loan:

START CalculateSimpleInterest(principal, rate, time)

    INPUT: float principal, float rate, float time

    OUTPUT: float interest

    interest <- principal * rate * time

    RETURN interest

END

This pseudocode represents an algorithm that calculates the simple interest on a loan given the principal amount, interest rate, and time period. It starts by calculating the interest as the product of the principal, rate, and time. It then returns the value of interest as the output of the algorithm.

In this pseudocode, principal, rate, and time are the input variables, and interest is the output variable. The keyword START indicates the start of the algorithm, and the keyword END indicates the end of the algorithm. The keyword INPUT specifies the input variables, and the keyword OUTPUT specifies the output variable. The keyword RETURN is used to return the output of the algorithm.

Flowchart

Flowchart symbols are graphical symbols used to represent different parts of an by showing the flow from one step to another. Here are some common flowchart symbols and their meanings:

  1. Oval or Circle: The oval or circle symbol represents the start or end of an algorithm.
  2. Rectangle: The rectangle symbol represents a process step or action.
  3. Diamond: The diamond symbol represents a decision point or branching point in the algorithm. It is used to represent a decision that must be made, with different branches leading to different outcomes based on the decision.
  4. Arrow: The arrow symbol represents the flow of the algorithm and is used to connect different symbols in the flowchart.
  5. Parallelogram: The parallelogram symbol represents input or output in the algorithm.
  6. Terminal: The terminal symbol represents the start or end of a subprocess within the main algorithm.
  7. Process: The process symbol represents a process step that involves some kind of manipulation or calculation.
  8. Predefined Process: The predefined process symbol represents a process step that involves using a predefined function or procedure.
  9. Off-page Connector: The off-page connector symbol represents a connection to a separate page or subprocess within the main algorithm.

Flowchart symbols are used to represent the different steps and decisions in an algorithm in a way that is easy for humans to understand and visualize. They are an important tool for representing algorithms and are widely used in a variety of fields.

Algorithms compared

Here is a table showing the advantages and disadvantages of algorithms represented in different forms:

FormAdvantagesDisadvantages
Narrative– Easy for humans to understand– Not precise
– Can be used to describe complex algorithms in an intuitive way– Difficult to translate into a programming language
– Can be used to communicate algorithms to people who are not familiar with programming languages
Pseudocode– Easy for humans to understand– Still, it is not  a real programming language, so it may require some translation to be implemented in a computer program
– Can be easily translated into a programming language
– Allows for a high level of precision and detail
Flowchart– Easy for humans to understand and visualize– May require more time and effort to create than pseudocode or narrative forms
– Can be used to communicate algorithms to people who are not familiar with programming languages– May not be as precise as pseudocode
– Can be helpful for understanding and debugging algorithms

As you can see, each form of representation has its own advantages and disadvantages. The form that is most suitable for a given situation will depend on the needs and goals of the person representing the algorithm.


[1] TA-Note

Python Example: Indefinite prompting to determine the corresponding grade for a given mark

Task

Create a program that would repeatedly prompt the user for a mark and outputs the corresponding grade.

Solution using discrete selection statements

confirm= input ("\nWould you like to enter a grade? \n Y for Yes, any other key for no\n")
while (confirm.lower() =="y" ):
    #processdata here
    grade = float(input("please enter a mark\n\n"))
    if (grade<50):
        print("fail")
    elif (grade<65):
        print("D")
    elif (grade<75):
        print("C")
    elif (grade<85):
        print("B")
    else:
        print ("A")
    
    #end dataprocessing
    confirm= input ("\nWould you like to enter a grade? \n Y for Yes, any other key for no\n")
print("end")

Solution using cascading/nested selection statements

confirm= input ("\nWould you like to enter a grade? \n Y for Yes, any other key for no\n")
while (confirm.lower() =="y" ):
    #processdata here
    grade = float(input("please enter a mark\n\n"))
    if (0<=grade and grade<50):
        print("fail")
    if (50<=grade and grade<65):
        print("D")
    if (65<=grade and grade<75):
        print("C")
    if (75<=grade and grade<85):
        print("B")
    if (85<=grade and
        ygrade<=100):
        print ("A")
    
    #end dataprocessing
    confirm= input ("\nWould you like to enter a grade? \n Y for Yes, any other key for no\n")
print("end")

© 2022  Vedesh Kungebeharry. All rights reserved.