2021 Paper 3 Marking Scheme

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]

Question 1
Public Class Form1
Private Sub OUTPUT_Click(sender As Object, e As EventArgs) Handles OUTPUT.Click
Dim name As String
name = TXTINPUTNAME.Text
MessageBox.Show("HELLO " & name, "Name Output", MessageBoxButtons.AbortRetryIgnore,
MessageBoxIcon.Information)
End Sub
End Class

Question 2
Public Class Form1
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
txtResult.Text = Val(txtFirstNum.Text) + Val(txtSecondNum.Text)
lblResult.Text = "Sum of two numbers is : "
End Sub

Private Sub btnSubtract_Click(sender As Object, e As EventArgs) Handles btnSubtract.Click


txtResult.Text = Val(txtFirstNum.Text) - Val(txtSecondNum.Text)
lblResult.Text = "Subtraction of two numbers is : "
End Sub

Private Sub btnDivide_Click(sender As Object, e As EventArgs) Handles btnDivide.Click


txtResult.Text = Val(txtFirstNum.Text) / Val(txtSecondNum.Text)
lblResult.Text = "Division of two numbers is : "
End Sub

Private Sub btnMultiply_Click(sender As Object, e As EventArgs) Handles btnMultiply.Click


txtResult.Text = Val(txtFirstNum.Text) + Val(txtSecondNum.Text)
lblResult.Text = "Multiplication of two numbers is : "
End Sub

Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click


txtFirstNum.Clear()
txtSecondNum.Clear()
txtResult.Clear()
End Sub

Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click


Close()

End Sub
End Class
SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]
Question 3
Public Class Form1
Private Sub btnLength_Click(sender As Object, e As EventArgs) Handles
btnLength.Click
Dim txtWord As String
txtWord = Len(txtString.Text)
txtResult.Text = txtWord
End Sub

Private Sub btnReverse_Click(sender As Object, e As EventArgs) Handles


btnReverse.Click
Dim txtWord As String
txtWord = txtString.Text
txtResult.Text = StrReverse(txtWord)
End Sub
End Class

Question 4 (a)
SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]
Question 4 (b)

Question 4 (c)
SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]
Question 4 (d)

Question 4 (d)
SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]

Question 5

<HTML>
<HEAD>
<title>MAKWATI SECONDARY SCHOOL</title>
</HEAD>

<BODY>
<center>
<h1>MAKWATI SECONDARY SCHOOL</h1>
</center>
<p>Makwati secondary school is a boys high school aiming at empowering the boy child.<br>
Our pride is in nurturing and producing the best world class leaders of tomorrow. Be<br>
that may be, Our Moto is "Pray, Work, Play".</p>

<H3> CORE VALUES </H3>


<P><b><i>The school thrieve on the following three core values</i><b></p>
<Ul>
<li>INTEGRITY</li>
<li>RESPECT</li>
<li>HONESTY</li>
</Ul>

<h3> SUBJECTS OFFERED BY THE SCHOOL</H3>


<ol>
<li>Mathematics</li>
<li>English</li>
<li>Shona</li>
<li>Geography</li>
<li>Computer science</li>
</ol>

<img src="Lighthouse.JPG" width="150" height ="150"><br>

<a href = "https://www.nust.ac.zw">NUST SCHORLARSHIPS</a>

<table border = "2">


<tr>
<th> 3rd term starts</th>
<th> 3rd term ends</th>
</tr>
<tr>
<td> 10 sept 2019</td>
<td> 5 dec 2019</td>
</tr>
</table>
</BODY>
</HTML>
SOLUTION COMPUTER SCIENCE 4021/03 [NOV 2021]

You might also like