You are on page 1of 13

Higher Nationals in Computing

Unit 1: Programming
ASSIGNMENT 1

Learner’s name: Nguyen Thuy My


ID: GCS200555
Class: GCS0905C
Subject code: 1618
Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:


ASSIGNMENT 1 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Nguyen Thuy My Student ID GCS200555

Class GCS0905C Assessor name Phan Minh Tam

Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.

Student’s signature

Grading grid
P1 M1 D1
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Signature & Date:


Assignment Brief 1 (RQF)
Higher National Certificate/Diploma in Computing

Student Name/ID Number: Nguyen Thuy My/GCS200555


Unit Number and Title: Unit 1: Programming
Academic Year: 2021 – 2022
Unit Assessor: Phan Minh Tam
Assignment Title: Problem solving with algorithms
Issue Date: 27 September 2021
Submission Date:
Internal Verifier Name:
Date:

Submission Format:

Format:

● The submission is in the form of an individual written report. This should be written in a concise,
formal business style using single spacing and font size 12. You are required to make use of
headings, paragraphs and subsections as appropriate, and all work must be supported with
research and referenced using the Harvard referencing system. Please also provide a bibliography
using the Harvard referencing system.

Submission

● Students are compulsory to submit the assignment in due date and in a way requested by the
Tutor.
● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/.
● Remember to convert the word file into PDF file before the submission on CMS.

Note:

● The individual Assignment must be your own work, and not copied by or from another student.
● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you
must reference your sources, using the Harvard style.
● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply
this requirement will result in a failed assignment.

Unit Learning Outcomes:

LO1 Define basic algorithms to carry out an operation and outline the process of programming an
application

Assignment Brief and Guidance:

Assignment scenario

You have applied for a post as a trainee with a software development company and have been invited
for an interview. You have been asked to demonstrate your problem solving and basic programming
skills. To do this you have to prepare a report on using algorithms to solve problems.
You need to explain, using examples, how algorithms are used to solve simple business problems and
the steps needed to be followed to produce a working program solution. You should make clear your
assumption about your program. The problems to be solved will involve basic procedural programming
instructions - sequence instructions (input, output and assignment statements), loops, conditional
statements. Problems should be analysed and designed by the use of flowchart and demonstrated by
the use of modules (procedures).
Tasks:

 State your simple business problems to be solved.


 Analyse the problem and design the solutions by the use of suitable methods.
 Demonstrate the compilation and running of a program
 Evaluate how the problem is solved from the designed algorithm to the execution program
written by a specific programming language.

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO1 Define basic algorithms to carry out an operation and outline the process of programming an
application

P1 Provide a definition of M1 Determine the steps taken D1 Examine the implementation


what an algorithm is and from writing code to execution. of an algorithm in a suitable
outline the process in language. Evaluate the
building an application. relationship between the
written algorithm and the code
variant.
Table of Contents
ASSIGNMENT 1 ANSWERS
INTRODUCTION

Algorithms have existed for a long time, they help people in most fields such as math, science,... And
now, in the 4.0 era, they support a lot in the field of science. calculator. They make it easier for people
to create and develop high-tech software and products by solving each algorithm and combining
them.
In this assignment, I will present the concept of algorithms, examples of algorithms in life, present a
small problem and how to solve it using algorithms, diagrams and and use C# programming language
to solve that problem.
P1. Provide a definition of what an algorithm is and outline the process in building an application.
Chapter 1: State your simple business problems to be solved
1. Overview about Algorithm
1.1. Definition of algorithms
An algorithm is a method, formula, or a specific finite-step procedure for solving
a problem that is based on performing a series of specified actions. A computer
program may be thought of as a complex algorithm. in mathematics and
computer science , an algorithm is a short process that solves a recurring issue.
The term algorithm is derived from the name of a mathematician, Mohammed
ibn-Musa al-Khwarizmi, who flourished between 780 and 850 and was a
member of Baghdad's royal court. Al-work Khwarizmi's is also the most likely
origins of the term algebra.

Page |1
1.2. Algorithm properties
An algorithm would consist of the following components:
 Accuracy: It is the most critical component in achieving successful outcomes and operations.
 Clarification: The method is based on the commands. As a result, the algorithm should be
presented in a clear, easy-to-understand manner and in a certain order.
 Universality: The algorithm must be very applicable. It is utilized to solve a wide range of
issues, not just specific ones.
 Objectivity: The algorithm, no matter how it is implemented, always yields only one answer. If
there is a different answer from the person who implements the algorithm or the computer, it
should be reconsidered
 Termination: Because an algorithm is a finite set, it always has an endpoint, as shown in the
What is an algorithm section. When a match is discovered, this is interpreted as the endpoint.
1.3. Some Algorithms

There are many algorithms, such as:


For almost any kind of math problem to solve
 Numerical algorithms.
 Algebraic algorithms.
 Geometric algorithms.
 Sequential algorithms.
 Operational algorithms.
 Theoretical algorithms.
Various algorithms are named after the top mathematicians who invented them
 Shor’s algorithm.
 Girvan-Newman algorithm.
Page |2
 Several Euclidian algorithms.
Algorithms are named after the specific problem they solve
 Bidirectional search algorithm.
 K-way merge algorithm.

1.4. Example of algorithms


“Find the second largest value of 10 interger numbers entered from the keyboard”
To implement the algorithm and produce its results, we have:
Input: 10 integers entered from the keyboard
Output: the second value of the sequence
Algorithm solving process:

STEP 1: STAR
STEP 2: Decalera MAX = 0, Array B[10]
STEP 3: Set variable i = 0
STEP 4: for i < length of array B, repeat STEP 5
STEP 5: Read B [i]
STEP 6: if N[i] > MAX is true then
STEP 6.1: Set MAX= B[i]
STEP 8: Read MAX
STEP 9: Decalera MAX2 = 0
STEP 10: for i < length of array B, repeat STEP 5
STEP 11: Read B[i]
STEP 12: if B[i] > MAX2 and B[i] < MAX is true then
STEP 12.1: Set MAX2 = B[i]
Step 13: Print MAX2
STEP 14: STOP

After solving the above algorithm, the result of the main algorithm is MAX2

Page |3
2. Algorithm

Page |4
REFERENCES

 Techopedia. Some algorithsm. [Online] Available at:


https://www.techopedia.com/definition/3739/algorithm http://www.mms.com/ [Accessed 28
September. 2021]
 WhatIs.Techtarget. Definition of algorithms. [Online] Available at:
https://whatis.techtarget.com/definition/algorithm [Accessed 28 September. 2021]

Page |5

You might also like