ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
June 15th 2021
Re-submission Date
Date Received 1st submission
June 15th 2021
Date Received 2nd submission
Student Name
Huỳnh Trần Anh Khoa
Student ID
GCS200252
Class
GCS0904_NX
Assessor name
Thái Thị Thanh Thảo
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
X
M1
D1
Summative Feedback:
Grade:
Lecturer Signature:
Resubmission Feedback:
Assessor Signature:
Date:
Contents
Introduction................................................................................................................................................................ 5
Algorithm ........................................................................................................................................................................ 7
A) What is the algorithm, the example ...................................................................................................................... 7
B) Characteristics of an algorithm .............................................................................................................................. 9
Conclusion ................................................................................................................................................................12
Reference: Cambridge Dictionary,2021. Available at :
............................................................................12
Introduction
Programming is the process of creating a set of instructions that tells the computer how to
build a program or solve a problem by writing computer code. Programming is one of the
basic subjects of the IT major. Programming can be used in a variety of computer
programming languages, such as JavaScript, Python, and C++...
A Programming Language is a formal language between human and computer, comprising
a set of strings that produce various kinds of machine code output. Programming
Languages are two formal languages that consist of a set of instructions that produce
various types of output. Programming Languages are used in the computer in the form of
an algorithm
Nowadays, programming languages are very important to the advancement of information
technology. It always changes and grows quickly every day, every year. Don't ask why
there are so many humanoid robots, artificial intelligence, or new products in the IT
industry. All these miracles are possible because of the programming languages
Programming is beneficial to human life and greatly affects human life today.
Technological products, programming help life to be simple and easy. Such as, at home,
they can help you do the housework, Mi Robot Vacuum-Mop Essential cleaning the house,
Dishwasher from Hafele or Bosch washing the dish or bowl, cup,... In business, robots can
help you get the best products to sell to customers and bring in the highest profits
Summarily, we have to know and understand the importance of programming for human
life. It gradually appears in all aspects of human life. Wherever you go, you need
programming, technology products. Because they help us have more free time for other
interests and do everything faster. Like in the Covid 19 Pandemic, if we don’t have
programming, technological products, we couldn’t work or study online. They bring lots of
benefits to human life.
Algorithm
A) What is the algorithm, the example
An algorithm is a set of mathematical instructions or rules that, especially it is used in the
computer to calculate an answer to solve the problem. An algorithm is a list of instructions
for solving a problem. An algorithm can be implemented in more than one or two
programming language
Example: Calculate the volume of the rectangular box
Figure 01: Example Flowchart of An Algorithm
Example: Write the function to Calculate the volume of the
rectangular box. For L = 62, W = 24, H = 27, the output volume V =
L*W*H = 62*24*27 = 40176
B) Characteristics of an algorithm
There are 6 Characteristics of an algorithm
- Input Specified: The input is the data to be transformed during the computation to
produce the output. An algorithm should have many inputs, 1 or more inputs or no
inputs at all, how much and what form the data should be
- Output Specified: The output is the data resulting from the computation. An
algorithm may have 0 or many defined outputs and must match the desired output.
- Definiteness: This means specifying the sequence of operations for turning an input
into output. It should contain everything quantitative and not quantitative.
- Effectiveness: For an algorithm to be effective, it means that all those steps that are
required to get to output must be feasible with the available resources
- Finiteness: Everything in the world has its limit, so does the algorithm. The
algorithm must stop within a certain limit. Stopping may mean that you get the
expected output or you get a response that no solution is possible. An algorithm
should not be infinite and always terminate after a definite number of steps. There is
no point in developing an algorithm that is infinite as it will be useless for us
My Problem: Write the program to adjust the price of the cars in the Mercedes Benz cars
company. By the best-selling cars ( more than 2000 cars ) will increase the price by 50%.
The next best-selling cars ( from 100 cars to 2000 cars ) will increase in price by 30%,
20%, and 10% respectively. Slow-selling cars ( from more than 10 cars to 100 cars ) will
be discounted from 10% to 30%, especially the slowest-selling cars ( least than 10 cars )
must be discounted by 50% and accompanied by special incentives for customers.
To solve that problem we need 4 steps:
1.
2.
3.
4.
Step 1: Check the number of sales of each car model
Step 2: Input the name of each car model and the number of sales of each car
Step 3: Compare with the topic conditions
Step 4: Out new price of each car model
Figure 2: Example steps adjust the price of car in Mercedes Benz Cars company
Conclusion
I solved my minor problem with the algorithm in 4 steps. Nowadays, algorithms are closely
linked with modern technology, they can help us to solve lots of problems quickly from
small to big. If algorithms and technology are used more in life, economy, and business,
the country will reach the peak of technology globalization. I hope everyone can use and
apply algorithms and technology in all fields to create more quality products. Our country
will develop stronger and stand shoulder to shoulder with the great powers.
Reference: Cambridge Dictionary,2021. Available at :
/>medium.com, Shlok Bhatt, 06/2021. Available at
/>