Cie AS Computing
Dear all,
Welcome to AS computing class. I am Dr.Ravi your facilitator for this course. This course consists of two modules, theory and practicals. In theory we will have 12 chapters and in practicals we do have programming classes. You will sit for theory and practical exams at the end of the course, which is conducted by CIE.
All the best, keep moving, for there is always a helping hand above you to guide you.
Dr.Ravi
Tags:
sorting 5 numbers in ascending order :
Dim a(5) As Integer
For i = 1 To 5
a(i) = InputBox("enter any number")
Next i
For i = 1 To 4
For j = i + 1 To 5
If a(i) < a(j) Then GoTo 90
z = a(i)
a(i) = a(j)
a(j) = z90
Next j
Next i
For i = 1 To 5
Form1.Print a(i)
Next i
Asmira, excellent piece of work. It good great. However, as a teacher, i need to point out the mistakes in your flowchart. For each decision diagram symbol (that is diamond symbol) you need a NO and a YES. In your Flowchart that is missing. So, you need to be bit careful while doing your Flowchart. Good attempt. Dr.Ravi
Let's see. So far I've learnt how to convert word documents into images (jpg) using zamzar. I've also used teamviewer, a form of legal hacking and taught how to ping another computer using the cmd command and IPCONFIG through run. Readnotify and open source were other useful tools I was taught. Learning how to draw on powerpoint was particularly interesting and I had fun creating my stern oriental figure. Finally, I learnt how to embed a video in powerpoint.
I'm looking forward to using all this in my daily life as I see myself making my life easier through these immeasurably handy tools.
I feel a little less scared of computers now, thank you Dr Ravi!
i tried to do a different print 5 initials:
Dim a(5), c(5) As String
For j = 1 To 5
a(j) = InputBox("Enter Name")
b = Mid$(a(j), 1, 1)
s=k
s = s + b
For i = 2 To Len(a(j))
b = Mid$(a(j), i, 1)
If b = " " Then s = s + Mid$(a(j), i + 1, 1)
c(j) = s
Next i
Next j
For j = 1 To 5
Form1.Print c(j)
Next j
i did the activity 6 like this
is there another way to simplify the 2nd part?
Private Function Parcelprice(ByVal weight As Integer) As String
w = Val(Text1.Text)
Select Case weight
Case 1
Parcelprice = 1.4
Case 2
Parcelprice = 2.7
Case 3
Parcelprice = 4
Case 4
Parcelprice = 7.5
Case 5
Parcelprice = w * 0.02
End Select
End Function
Private Sub Command1_Click()
w = Val(Text1.Text)
For i = 1 To 50
If i = w Then weight = 1
Next i
For i = 51To 100
If i = w Then weight = 2
Next i
For i = 101 To 250
If i = w Then weight = 3
Next i
For i = 251 To 500
If i = w Then weight = 4
Next i
For i = 501 To 99999
If i = w Then weight = 5
Next i
Label4.Caption = Parcelprice(weight)
End Sub
I did Activity 6 like this.
Private Function weight(cost As Integer) As String
Select Case cost
Case 1
weight = "1.4"
Case 2
weight = "2.7"
Case 3
weight = "4"
Case 4
weight = "7.5"
Case 5
a = InputBox("enter mass above 500g")
weight = Val(a) * 0.02
End Select
End Function
Private Sub Command1_Click()
If Combo1.ListIndex = 0 Then Text2.Text = weight(1)
If Combo1.ListIndex = 1 Then Text2.Text = weight(2)
If Combo1.ListIndex = 2 Then Text2.Text = weight(3)
If Combo1.ListIndex = 3 Then Text2.Text = weight(4)
If Combo1.ListIndex = 4 Then Text2.Text = weight(5)
End Sub
Private Sub Form_Load()
Combo1.Clear
Combo1.AddItem " 0 - 50 "
Combo1.AddItem " 51 - 100 "
Combo1.AddItem " 101 - 250 "
Combo1.AddItem " 251 - 500 "
Combo1.AddItem " > 500"
Combo1.ListIndex = 0
End Sub
© 2025 Created by Ravichandran.
Powered by