You are on page 1of 16

Assessment Task Term 2 Year 10

Software Development and Programming


Ankit Raichurkar
Teacher: Mr. Pinget

Abhinav Ganguly

1 Table of Contents
1

Table of Contents..........................................................................1

Problem 2 Resolve linear equations with three unknowns...........2


2.1

Input Process Output (IPO).......................................................2

2.2

Pseudocode:............................................................................3

2.3

Flow Chart:..............................................................................5

2.4

Desk Check:............................................................................5

2.4.1
2.5
3

Desk Check 1...................................................................5

Scratch Program:.....................................................................7

Problem 3 Resolve quadratic Equations with two unknowns......11


3.1

Input Process Output (IPO).....................................................11

3.2

Pseudocode:..........................................................................11

3.3

Flow Chart:............................................................................12

3.4

Desk Check:...........................................................................13

3.4.1

Desk Check 1..................................................................13

3.4.2

Desk Check 2..................................................................14

3.4.3

Desk Check 3..................................................................14

3.5

Scratch Program:...................................................................16

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

Abhinav Ganguly

2 Problem 2 Resolve linear equations with three


unknowns
2.1 Input Process Output (IPO)
S.N
o.
1.

Input

Process

The value of variablesa,


b, c, d, e, f, g, h, i, j, k,
and l for the three
linear
equationsax+by+cz=d
, ex+fy+gz=h and
ix+jy+kx=l

2.

Value of variablesa, b,
c, d, e, f, g, h, i, j, k,
and l

3.

Output

Read and save the


input value of the
variablesa, b, c, d, e,
f, g, h, i, j, k, and l.
Check the value of
these variables is
positive or negative
numbers, and not
letters - by checking
the
user
input
against
the
rule
[not(input=0)
and
(input+1=1)] is true
or not.

Validated
input value
of
variablesa,
b, c, d, e, f,
g, h, i, j, k,
and l

Calculate the value


of variable Delta
using Cramers rule,
i.e. Delta = [a*(f*kg*j)] [b*(e*k-i*g)] +
[c*(e*j-i*f)]

The value of
Delta

Value of variablesa, b,
c, d, e, f, g, h, i, j, k,
and l

The value of
Delta-x

4.

Value of variablesa, b,
c, d, e, f, g, h, i, j, k,
and l

The value of
Delta-y

5.

Value of variablesa, b,
c, d, e, f, g, h, i, j, k,

Calculate the value


of variable Delta-x
using Cramers rule,
i.e. Delta-x = [d*(f*kg*j)] [b*(h*k-l*g)] +
[c*(h*j-l*f)]
Calculate the value
of variable Delta-y
using Cramers rule,
i.e. Delta-y =
[a*(h*k-g*l)]
[d*(e*k-i*g)] +
[c*(e*l-i*h)]
Calculate the value
of variable Delta-z

The value of
Delta-z

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
and l
using Cramers rule,
i.e. Delta-z = [a*(f*lh*j)] [b*(e*l-i*h)] +
[d*(e*j-i*f)]
6.
Value of Delta and
Calculate the value
Delta-x
of x using (Deltax/Delta)
7.
Value of Delta and
Calculate the value
Delta-y
of y using (Deltay/Delta)
8.
Value of Delta and
Calculate the value
Delta-z
of z using (Deltaz/Delta)

Abhinav Ganguly

The value of
x

The value of
y

The value of
z

2.2 Pseudocode:
Define variables a, b, c, d, e, f, g, h, i, j, k, l, Delta, Delta-x, Delta-y, Delta-z, x, y,
and z
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET
SET

Delta to zero
Delta-x to zero
Delta-y to zero
Delta-z to zero
a to zero
b to zero
c to zero
d to zero
e to zero
f to zero
g to zero
h to zero
i to zero
j to zero
k to zero
l to zero
x to zero
y to zero
z to zero

OBTAIN the user input value of a


REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of b
3

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of c
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of d
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of e
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of f
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of g
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of h
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of i
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of j
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of k
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
OBTAIN the user input value of l
REPEAT UNTIL {not[not(input=0) and (input+1=1)]}
RETURN Error Not a numbertry again
SET Delta = [a*(f*k-g*j)] [b*(e*k-i*g)] + [c*(e*j-i*f)]
SET Delta-x = [d*(f*k-g*j)] [b*(h*k-l*g)] + [c*(h*j-l*f)]
SET Delta-y = [a*(h*k-g*l)] [d*(e*k-i*g)] + [c*(e*l-i*h)]
SET Delta-z = [a*(f*l-h*j)] [b*(e*l-i*h)] + [d*(e*j-i*f)]
SET x = (Delta-x/Delta)
4

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
SET y = (Delta-y/Delta)
SET z = (Delta-y/Delta)

2.3 Flow Chart:

2.4 Desk Check:


2.4.1 Desk Check 1
Solve
4x + 5y 2z = -14
7x y + 2z = 42
3x + y + 4z = 28

Abhinav Ganguly

Assessment Task Term 2 Year 10


Abhinav Ganguly
Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
Therefore, a = 4, b = 5, c = -2, d = -14, e = 7, f = -1, g = 2, h = 42, i = 3, j = 1,
k = 4, l = 28
Hence, Delta = [a*(f*k-g*j)] [b*(e*k-i*g)] + [c*(e*j-i*f)] = -154
Delta-x = [d*(f*k-g*j)] [b*(h*k-l*g)] + [c*(h*j-l*f)] = -616
Delta-y = [a*(h*k-g*l)] [d*(e*k-i*g)] + [c*(e*l-i*h)] = 616
Delta-z = [a*(f*l-h*j)] [b*(e*l-i*h)] + [d*(e*j-i*f)] = -770
x = (Delta-x/Delta) = -616/-154 = 4
y = (Delta-y/Delta) = 616/-154 = -4
z = (Delta-y/Delta) = -770/-154 = 5

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

2.5 Scratch Program:

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

10

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

Abhinav Ganguly

3 Problem 3 Resolve quadratic Equations with two


unknowns
3.1 Input Process Output (IPO)
S.N
o.
1.

2.

3.
4.

5.

Input
The value of variable
A,B and C for the
quadratic equation
Ax2+Bx+C=0

When D=0, the value


of Discriminant
D =0 and Real Re
The value of variable A
and Discriminant D
When D>0, the value
of Discriminant
D =0 , Re and Im
When D<0, the value
of Discriminant
D =0 , Re and Im

Process

Read and save the


input value of
variable A, B and C.
Calculate the
discriminant D
Calculate Real Re
Set the value of x=Re

The value of
x

Calculate the value


of Imaginary Im
Calculate the two
values of x1 , x2

Calculate the two


complex values of x1
, x2

The value of
Im
The two
possible
values of x1
and x2
The two
complex
values of x1
and x2

3.2 Pseudocode:
Define variables A,B,C,D,Im,Re and D
SET
SET
SET
SET
SET
SET

Output

A to zero
B to zero
C to zero
D to zero
Im to zero
Re to zero
11

The value of
Discrimina
nt D
The value of
Real Re

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
OBTAIN the user input value of A
IF A=0
RETURN Error Not a quadratic Equation
ELSE
OBTAIN the user input value of B
OBTAIN the user input value of C
SET D = B*B 4*A*C
SET Re = -B/2A
END IF
IF D=0
SET X = Re
ELSE
Set Im = (Square root of absolute of D) / 2 *A
IF D > 0
SET x1 = Re + Im
SET x2 = Re - Im
ELSE
x1 = Re + Im i
x2 = Re Im i
END IF
END IF

3.3 Flow Chart:

12

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

3.4 Desk Check:


3.4.1 Desk Check 1
Solve x(x 2) = 4.
x(x 2) = 4
x2 2x = 4
x2 2x 4 = 0
Hence, A = 1, B = 2, and C = 4: Copy
Therefore, D= B*B 4 *A*C = 20
Re = - B / 2 *A = 1

Since D >0 , Im = (Sqrt of absolute D) / 2 * A = 2.2


x1 = Re + Im = 3.236 , and x2 = Re Im = - 1.236

13

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

3.4.2 Desk Check 2


Solve 9x2 + 12x + 4 = 0.
Using A = 9, B = 12 and C = 4,
Therefore, D= B*B 4 *A*C = 0
Re = - B / 2 *A = - 2/3 = -0.7
Since D =0, x = Re = 0.666

3.4.3 Desk Check 3


Solve 3x2 + 4x + 2 = 0
Using A = 3, B = 4 and C = 2,
Therefore, D= B*B 4 *A*C= -8
Re = - B / 2 *A = - 2/3 = -0.7
Since D < 0, Im = (Sqrt of absolute D) / 2 * A = 0.5

14

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget
x1 = Re + Im = - 0.666 + 0.471i
x2 = Re Im = -0.666 - 0.471i

15

Abhinav Ganguly

Assessment Task Term 2 Year 10


Software Development and Programming
Ankit Raichurkar
Teacher: Mr. Pinget

3.5 Scratch Program:

16

Abhinav Ganguly