AS computing

Cie AS Computing

Dear students of Block 6 AS computing, welcome to the computing class. I am your facilitator Dr.Ravichandran ( you can call me Dr.Ravi), I will be your course facilitator for AS computing and A2 computing. I will start communicating with you in this discussion forum - where you can start posting your queries and useful resources.

You are highly encouraged to interact with me and also with your peers as the class begins from 30th July 2013.

All the best and keep moving. Do not hesitate to ask and send your queries if you have one.

Regards,

Dr.Ravichandran

i HAVE ATTACHED THE SYLLABUS TOO.

YOU CAN DOWNLOAD THE ATTACHMENT FILE.

Views: 3788

Attachments:

Reply to This

Replies to This Discussion

Dear Dr Ravi ,

I have made the correction and printed it out, yet just now Suhen just told me that I have to post it here. 

Sorry for posting it late.

sincerely,

Ameer Sorne (7572)

Attachments:

Dear Dr. Ravi,

This is my assignment (corrections).

Attachments:
complete:::::::::::::::::::::::=========================

Dim a(3, 4) As Integer

For r = 1 To 3
For c = 1 To 4
a(r, c) = InputBox("enter")
Next c
Next r

For r = 1 To 3
For c = 1 To 4
Print a(r, c);
Next c
Form1.Print
Next r

'''''''''''''''''' 'january
For j = 1 To 3
If j = 1 Then
b = a(j, 1)
Else
b = b + a(j, 1)

End If
Next j
Form1.Print
Print "January selling :" + Str(b)

'''''''''''''''''' 'februari
For f = 1 To 3
If f = 1 Then
e = a(f, 2)
Else
e = e + a(f, 2)

End If
Next f
Form1.Print
Print "februari selling :" + Str(e)

'''''''''''''''''' 'march
For m = 1 To 3
If m = 1 Then
g = a(m, 3)
Else
g = g + a(m, 3)

End If
Next m
Form1.Print
Print "march selling :" + Str(g)

'''''''''''''''''' 'april
For h = 1 To 3
If h = 1 Then
i = a(h, 4)
Else
i = i + a(h, 4)

End If
Next h
Form1.Print
Print "april selling :" + Str(i)

Form1.Print
Form1.Print


'''''''''''''''''' 'proton
For p = 1 To 4
If p = 1 Then
k = a(1, p)
Else
k = k + a(1, p)

End If
Next p
Form1.Print
Print "proton selling :" + Str(k)


'''''''''''''''''' 'bmw
For w = 1 To 4
If w = 1 Then
l = a(2, w)
Else
l = l + a(2, w)

End If
Next w
Form1.Print
Print "bmw selling :" + Str(l)


'''''''''''''''''' 'merc
For y = 1 To 4
If y = 1 Then
n = a(3, y)
Else
n = n + a(3, y)

End If
Next y
Form1.Print
Print "merc selling :" + Str(n)

Oh my God, what a long programming codes you can do. I think we can send it to Malaysian genius book of record lah.

Any way good attempt. But you need to wait until I take it up in the class for a simplified version.

The most important think in this code is the Dim statement , which got it wrong , so you will get 0/10 as the very basic logic behind this programe fails.

Regards,

Dr.Ravi

This is my code for the total sales of all three cars in 4 months.


Private Sub Command1_Click()
Dim a(3, 4) As Integer
For C = 1 To 3
For M = 1 To 4
a(C, M) = InputBox("Please enter the sales for this month")
Next M
Next C


For M = 1 To 4
s = 0
For C = 1 To 3
s = s + a(C, M)
Next C
If M = 1 Then MsgBox "The total sales for January is" + Str(s)
If M = 2 Then MsgBox "The total sales for February is" + Str(s)
If M = 3 Then MsgBox "The total sales for March is" + Str(s)
If M = 4 Then MsgBox "The total sales for April is" + Str(s)
Next M


For C = 1 To 3
x = 0
For M = 1 To 4
x = x + a(C, M)
Next M
If C = 1 Then MsgBox "The total sales for Proton in all months is" + Str(x)
If C = 2 Then MsgBox "The total sales for BMW in all months is" + Str(x)
If C = 3 Then MsgBox "The total sales for Mercedes Benz is" + Str(x)
Next C
End Sub
It works =D

Private Sub Command1_Click()
If Val(Text2.Text) > 50 Then Text3.Text = Text1.Text + " PASSED"

If Val(Text2.Text) > 50 Then Text3.BackColor = vbGreen
If Val(Text2.Text) < 50 Then Text3.Text = Text1.Text + " FAILED"
If Val(Text2.Text) < 50 Then Text3.BackColor = vbRed


Label3.Enabled = True
Text3.Enabled = True
End Sub


Private Sub Form_Load()
Label3.Enabled = False
Text3.Enabled = False
End Sub
For the textbox input program.

Private Sub Command1_Click()
Label3.Enabled = True
Text3.Enabled = True
If Val(Text2.Text) >= 90 Then Text3.Text = Text1.Text + " has passed with grade A* for" + Text4.Text
If Val(Text2.Text) >= 80 And Val(Text2.Text) < 90 Then Text3.Text = Text1.Text + " has passed with grade A for " + Text4.Text
If Val(Text2.Text) >= 70 And Val(Text2.Text) < 80 Then Text3.Text = Text1.Text + " has passed with grade B for " + Text4.Text
If Val(Text2.Text) >= 60 And Val(Text2.Text) < 70 Then Text3.Text = Text1.Text + " has passed with grade C for " + Text4.Text
If Val(Text2.Text) >= 50 And Val(Text2.Text) < 60 Then Text3.Text = Text1.Text + " has passed with grade D for " + Text4.Text
If Val(Text2.Text) < 50 Then Text3.Text = Text1.Text + " has failed."

If Val(Text2.Text) >= 90 Then Text3.BackColor = vbGreen
If Val(Text2.Text) >= 80 And Val(Text2.Text) < 90 Then Text3.BackColor = vbGreen
If Val(Text2.Text) >= 70 And Val(Text2.Text) < 80 Then Text3.BackColor = vbGreen
If Val(Text2.Text) >= 60 And Val(Text2.Text) < 70 Then Text3.BackColor = vbGreen
If Val(Text2.Text) >= 50 And Val(Text2.Text) < 60 Then Text3.BackColor = vbGreen
If Val(Text2.Text) < 50 Then Text3.BackColor = vbRed





End Sub

Private Sub Form_Load()
Text3.Enabled = False

End Sub
New programming codes

If Val(Text2.Text) >= 30 And Val(Text2.Text) < 60 Then Text3.Text = Text1.Text + " is an adult"
If Val(Text2.Text) >= 60 Then Text3.Text = Text1.Text + " is a senior citizen."
If Val(Text2.Text) < 30 And Val(Text2.Text) >= 20 Then Text3.Text = Text1.Text + " is a young adult"
If Val(Text2.Text) >= 15 And Val(Text2.Text) < 20 Then Text3.Text = Text1.Text + " is a teenager"
If Val(Text2.Text) < 15 Then Text3.Text = Text1.Text + " is a child"


If Option1.Value = True Then Text3.Text = Text3.Text + ", a male"
If Option2.Value = True Then Text3.Text = Text3.Text + ", a female"

If Check1.Value = 1 Then Text3.Text = Text3.Text + " and also married."
If Check2.Value = 1 Then Text3.Text = Text3.Text + " and still single."
If Check3.Value = 1 Then Text3.Text = Text3.Text + " and is divorced."
Hope you guys have all taken the group assignment task and working, if you have done it, you can start sharing it in the discussion forum with your peers. Later we can take it up as discussion in classroom.
Regards,
Dr.Ravi

Interactive Problem Based Learning

Please check Arieal's program interpretation.

Dr.Ravi

This video is private ............

Reply to Discussion

RSS

© 2025   Created by Ravichandran.   Powered by

Report an Issue  |  Terms of Service