Exp 1
Exp 1
Experiment: 1
PART A
Algorithm:
Defined as: “A sequence of activities to be processed for getting desired output from a given
input.”
+ Addition
- Subtraction
* Multiplication
/ Division
algorithm
Flowchart:
Defined as a diagram which visually presents the flow of data through processing systems.
Flowcharts can be used for representing an algorithm. It describes the operations (and in
what sequence) are required to solve a given problem.
Tasks:
5. Write an algorithm and draw a flow chart to check whether a number is even or
odd.
6. Write an algorithm and draw a flow chart to read a student's percentage marks,
classify it into different grades, and display the grade. If the percentage marks
secured are greater than or equal to 90, the student is awarded grade A; but if they
are greater than or equal to 80 but less than 90, Grade B is awarded; if they are
greater than or equal to 65 but less than 80, Grade C is awarded; otherwise, Grade
D is awarded.
7. Write an algorithm and draw a flow chart to input the lengths of three sides of a
triangle and check whether the triangle is valid or not. Also, classify the triangle as
equilateral, isosceles or scalene.
Note: If the sum of the lengths of any two sides is greater than the length of the
third side then a triangle is valid.
Equilateral triangle: if all sides are equal.
Isosceles triangle: if any two sides are equal.
Scalene triangle: if the above two condition fails.
8. Write an algorithm and draw a flow chart to find the factorial of a number.
SVKM’s NMIMS
Mukesh Patel School of Technology Management & Engineering /
School of Technology Management & Engineering
9. Write an algorithm and draw a flow chart to find the sum of the following series- 12
+ 22 + 32 +…. N2
PART B
Students must solve experiment-1 in workbook and submit the evaluated signed soft copy.
The soft copy must be uploaded on the portal. The filename should be
PPS_batch_rollno_experimentno Example: PPS_A1_A001_P1
Prog/Yr/Sem: Batch:
Tasks:
1.
2.
3.