Testing:
Test Name Test Expected Actual Output Status Input
Number Outputs
Addition of two 1 38 38 Pass 15
Positive numbers 23
Addition of two 2 -70 -70 Pass -40
Negative numbers -30
Addition of two 3 5.75 5.75 Pass 3.5, 2.25
floating numbers
Subtraction of two 4 35 35 Pass 70
positive numbers
35
Subtraction of two 5 10 10 Pass -30
negative numbers
-40
Subtraction of two 6 -10 -10 Pass 10.5,
floating numbers
20.5
Multiplication of 7 30 30 Pass 6,5
two small
numbers
Multiplication of 8 161525 161525 Pass 355,
two large numbers
455
Multiplication of 9 1190 1190 Pass -35,
two negative
numbers -34
Division of two 10 5 5 Pass 25,
integer numbers.
5
Division of two 11 9 9 Pass -27,-3
negative numbers.
Division of a A Message should A message will
12 print “Zero Division print “Zero Pass 9,0
number by zero. Error” Division Error”
Division of zero 13 0 0 Pass 0,8
by any number.
sin of an angle 14 0.5 0.5 Pass 30
degree
Test Name Test Number Expected Actual Output Status
Outputs
cos of an angle 15 0.5 0.5 60 degree
tan of an angle 16 1 1 45 degree
except n*90 degree
tan of an angle( A Message should A message will print
17 print “Value Error” “Value Error” 90 degree
multiple 90
degree)
sin inverse of value 18 90 degree 90 degree 1
between
[-1,1]
cos inverse of 19 90 degree 90 degree 0
value between
[-1,1]
tan inverse of any 20 45 degree 45 degree 1
value
Logarithm base 10 21 2.0 2.0 100.0
of a positive
number
Logarithm base e 22 2.302585 2.302585 10.0
of a positive
number
Logarithm base2 23 5.0 5.0 32.0
of a positive
number
Square root of a 24 35 35 1225
positive number.
Factorial of a 25 120 120 5
positive integer.
Matrix addition 26 [[6, 8], [10, 12]] [[6, 8], [10, 12]] [[1, 2], [3, 4]], [[5,
6], [7, 8]]
Matrix subtraction 27
Matrix 28 [[19, 22], [43, 50]] [[19, 22], [43, 50]] [[1, 2], [3, 4]], [[5,
multiplication 6], [7, 8]]
Test with small integers.
Test with large integers.
Test with floating-point numbers.
Test multiplication by zero.