Preliminary Software Engineering
Unit 1 - Programming Fundamentals
Unit 1 - Programming Fundamentals
  • 1 - Programming Fundamentals
    • Programming Fundamentals Content
  • 2 - Python
    • Expected Python Knowledge
    • GitHub
    • Learning Python
    • Data Structures and File Management
      • Data Structures
        • Lists
        • Arrays
          • Single and Multi-Dimensional Arrays
        • Lists vs Arrays
          • Activities
        • Tuples
        • Sets
        • Dictionaries
          • Activities
      • File Handling
        • Loops, Lists, Dictionaries
        • Activities
  • 3 - Theory Content
    • Theory Content Explained
      • NESA Directional Verbs
      • Responding to Directional Verbs
  • 4 - Software Development and Management
    • Approaches to Software Development
      • Waterfall Model
      • Agile Model
      • Summary: Waterfall vs Agile
      • Activities
    • Software Development Steps
      • Sample Exam Question
      • Requirements Definition
        • Understanding the Need
        • Key Questions to Ask
        • Examples
        • Activities
        • Sample Exam Question
      • Determining Specifications
        • Functional Specifications
        • Non-Functional Specifications
        • Activities
      • Design
        • Top-Down Design Approach
        • Bottom-Up Design Approach
      • Development
        • Optimising Code
      • Integration
        • Example: Payment Program
        • Activity
        • Application Programming Interface (API)
          • Example: OpenWeather API
          • Example: WeatherAPI
          • Activity: Prepare Spells
      • Testing and Debugging
        • Test Data
          • Activities
        • Testing the System
          • Activities
        • Debugging
          • Types of Errors
            • Activities
          • Python Debugger
            • Activities
          • VS Code Debugger
            • Activities
      • Installation
        • Activities
        • Sample Exam Question
      • Maintenance
  • Charts and Algorithms
    • Example: IPO Charts and Pseudocode
      • Activities
    • Algorithms, Flowcharts, Pseudocode
      • Pseudocode Activities
      • Flowchart Activities
      • Sample Exam Questions
    • Structure Charts
      • Activities
      • Sample Exam Questions
    • Data Flow Diagrams
      • Activities
    • Data Dictionaries
      • Activities
    • Decision Trees
      • Activities
      • Sample Exam Questions
    • Gantt Chart
    • Class Diagrams
      • Sample Exam Question
    • Storyboards
      • Sample Exam Question
  • Testing and Debugging
    • Test Data
      • Activities
    • Testing the System
      • Activities
    • Debugging
      • Types of Errors
        • Activities
      • Python Debugger
        • Activities
      • VS Code Debugger
        • Activities
  • Computational Thinking
    • Decomposition
    • Abstraction
    • Activities
  • Version Control
    • Git
    • GitHub
    • Activities
  • Number Systems
    • Binary Systems
    • Hexadecimal Numbers
    • Using Two's Complement
    • Activities
  • 5 - Assessment Task 1
    • Data Science Project
      • Before we Start
        • Setting up GitHub Repository
        • Setting Up Markdown Documentation
      • Examples of API Usage
        • Starter Code: NASA Scenario
        • Starter Code: Spell Book
        • Starter: Pokédex Explorer
        • Starter Code: Weather App
        • Example: OpenWeather API
        • Example: WeatherAPI
        • Example: Prepare Spells
    • Task Guide
      • Requirements Definition
      • Determining Specifications
        • Use Cases
      • Design
        • Gantt Chart
        • Structure Chart
        • Algorithms
        • Data Dictionary
      • Development
        • Comments vs DocStrings
        • UI - main.py
        • Create Python Module
          • Example: NASA Module
          • Example: WeatherFetch Module
          • Example: SpellBook Module
      • Integration
        • Example: Pokedex
      • Testing and Debugging
        • Commit Changes
      • Installation
      • Maintenance
    • Submitting Your Task
Powered by GitBook
On this page
  1. Charts and Algorithms
  2. Algorithms, Flowcharts, Pseudocode

Flowchart Activities

PreviousPseudocode ActivitiesNextSample Exam Questions

Last updated 3 months ago

Before we start, it's worth noting that in an online exam environment you will actually need to create flowcharts using blocks in the exam window itself. We will look at this later in the course, but it is in that spirit that I would suggest we use Lucid Chart for now so you get used to creating charts in a digital environment. You could also just use the drawing tools in Google Docs. You are also welcome to draw them on paper first if you would like.

  1. Create a flowchart based on the following algorithms (one at a time):

    1. BEGIN 
          read (num1)
          read (num2)
          Set total to num1 + num2
          Set average to total / 2
          Display average
      END
    2. BEGIN
          read (score)
          IF score >= 85
              Display "Excellent"
          ELSEIF score >= 70
              Display "Good"
          ELSEIF score >= 50
              Display "Average"
          ELSE
              Display "Fail"
          ENDIF
      END
    3. BEGIN
          read (N)
          Set totalSum to 0
          FOR i = 1 to N
              Add i to totalSum
          NEXT i
          Display totalSum
      END
    4. BEGIN
          read (N)
          Set totalSum to 0
          FOR i = 1 to N
              Call CheckEven (i, totalSum)
          NEXT i
          Display totalSum
      END
      
      BEGIN CheckEven (num, totalSum)
          IF num MOD 2 = 0
              Add num to totalSum
          ENDIF
      END CheckEven

  1. Write pseudocode AND produce a flowhcart for each of the following Python programs:

    1. total_sum = 0
      
      for number in range(1, 11):
          total_sum += number
      
      print("The total sum is:", total_sum)
      
      
    2. age = int(input("Enter your age: "))
      
      
      if age < 13:
          print("You are a Child.")
      elif 13 <= age <= 19:
          print("You are a Teenager.")
      elif 20 <= age <= 64:
          print("You are an Adult.")
      else:
          print("You are a Senior.")
          
          
    3. N = int(input("Enter a number N: "))
      
      for i in range(1, N+1):  
          print(f"Checking number {i}:")
          
          if i < 10:
              print(f"{i} is less than 10.")
          elif i > 10:
              print(f"{i} is greater than 10.")
          else:
              print(f"{i} is equal to 10.")
              
              
    4. def calculate_factorial(num):
          factorial = 1
          for i in range(1, num + 1):
              factorial *= i
          return factorial
          
      number = int(input("Enter a number: "))
      
      factorial_result = calculate_factorial(number)
      
      print(f"The factorial of {number} is {factorial_result}.")
      
      

Intelligent Diagramming | LucidchartLucidchart
Logo