Docsity

Assignment Programming Algorithms, Assignments of Programming Languages

Partial preview of the text

Download Assignment Programming Algorithms and more Assignments Programming Languages in PDF only on Docsity!

SUBMITTED BY

FULL NAME:

COURSE: BSc.it SEMESTER: SECTION: YEAR OF ENROLLMENT:

SUBMITTED TO:

Sir Name

Programming 2020

Table of Contents

Introduction................................................................................................................................................................ Algorithm................................................................................................................................................................... Key Features of Algorithm..................................................................................................................................... Advantages of Algorithm....................................................................................................................................... Disadvantages of Algorithms:................................................................................................................................ Examples of algorithm............................................................................................................................................ Part 1

  1. You will need to explain what an algorithm is, with examples of their use, comparing their efficiency against brute forcing, and how it will relate to the application development process, down to the implementation in a suitable language. Research could be conducted on your choice of algorithms, including sorting and searching data or encryption/decryption, compression/decompression. Note: prepare a presentation for ten-minutes using Microsoft® PowerPoint® style presentation to be presented to your colleagues. The presentation can include links to performance data and a Name (HND/ First Semester)

Introduction Programming is a process creating a set of instructions that orders the computer how to perform a certain task by using a variety of programming language like JavaScript, python, C#, C, etc. Programming is generally used to find a set of instruction which will automate the given task at hand. The process of writing different set of programming language is called coding. We will be discussing about what algorithm mean and what are its features as well as its advantages and disadvantages with some examples as well. Next, we will also be discussing about software development life cycle with different types IDE or development environment for different programming languages and which we will be using in order to make our software and why are we using this certain development environment with its useful features and so on.

Algorithm

Name (HND/ First Semester)

Let’s start with what algorithm really is so basically, algorithm is to write a logical step-by-step method to solve the problem, in other words, an algorithm is a step for solving problems. In order to solve a mathematical or computer problem, this is the first step of the procedure. An algorithm includes calculations, reasoning and data processing. Algorithms can also be presented by flowchart. Name (HND/ First Semester)

Advantages of Algorithm

  1. It is a step-wise representation of a solution to a given problem, which makes it easy to understand.
  2. An algorithm uses a definite procedure.
  3. It is not dependent on any programming language, so it is easy to understand for anyone even without knowledge of programming language.
  4. Every step in an algorithm has its own logical sequence so it is easy to debug.
  5. By using algorithm, the problem is broken down into smaller pieces or steps so, it is easier for programmer to convert it into an actual program. Name (HND/ First Semester)

Disadvantages of Algorithms:

  1. Algorithms is time consuming as each step are broken down into smaller pieces in order to make it easier to understand.
  2. It is difficult to show Branching and Looping in Algorithms.
  3. Big tasks are difficult to put in Algorithms as it will be bit difficult to break down big tasks into smaller piece or steps. Name (HND/ First Semester)

2. Here we have a solution for an algorithm to find the largest among three different numbers

entered by the user.

Step 1: Start Step 2: Declare variables a, b and c. Step 3: Read variables a, b and c. Step 4: If a > b If a > c Display a is the largest number. Else Display c is the largest number. Else If b > c Display b is the largest number. Else Display c is the greatest number. Step 5: Stop To complete an algorithm to find the largest among three different numbers, firstly we should start the program by writing start in step 1. Then, we should enter the value three numbers. For example, if the three numbers are a, b and c then we should enter the value for a, b and c. Then the program reads the value of the entered three numbers that is a, b and c in the next step. After reading the value of three numbers, we should denote the numbers to with greater than sign. After performing mathematical operation, we should get the output of the program that is greater number. Then, we can finally close our program in the next step by writing stop and run the program. Finally, we can get the final output that was to find the largest among three different numbers. Name (HND/ First Semester)