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

In this lesson, I learnt how to make use of Microsoft Excel in managing my data. The use of formulas to calculate my data efficiently and to create a summary of my overall data by producing bar charts is indeed a useful skills that will be needed.

Attachments:

3 Programming task... Let's do this guys & girl! :D

to dr ravi

i won't be around KY this weekend. i'm going back home this week so i'll not be able to use vbnet to test the programming task that dr ravi gave us today since my laptop doesn't have the vbnet thing. but, i'll work the task out except for running the program in vbnet.sorry for troublesome

sir, i didnt understand compltely about the homework :( i traced but no accurate results

Can I paste the programme here . So everyone can check it out ? 

To check whether an input number is a prime number or not:

a = InputBox("Please input the value")
X = Val(a)
If X = 1 Then MsgBox "1 is a prime number": End
i = 1
10 If X / i = Int(X / i) Then p = p + 1
i = i + 1
If i <= X Then GoTo 10
If p = 2 Then MsgBox Str(X) + " is a prime number": End
If p <> 2 Then MsgBox Str(X) + " is not a prime number": End

For prime numbers from 1 to 100:

a = 1
X = Val(a)
If X = 1 Then MsgBox "1 is a prime number": X = X + 1
i = 1
10 If X / i = Int(X / i) Then p = p + 1
i = i + 1
If i <= X Then GoTo 10
If p = 2 Then MsgBox Str(X) + " is a prime number"
If p <> 2 Then MsgBox Str(X) + " is not a prime number"
X = X + 1
p = 0
i = 1
If X >= 101 Then End
GoTo 10

Private Sub Command2_Click()
x = 1
12 i = 1
p = 0
10 If x / i = Int(x / i) Then p = p + 1
i = i + 1
If i <= x Then GoTo 10
If p <= 2 Then MsgBox "the prime number is" + Str(x)
x = x + 1
If x > 100 Then MsgBox "done": End
GoTo 12
End Sub

thanks Ariel ! :*

the task was to generate a list of prime no. from 1-100

Dim x, i, p As Integer
Private Sub Command1_Click()
10 x = x + 1
If x = 1 Then Print x
i = 1
p = 0
20 If x / i = Int(x / i) Then p = p + 1
i = i + 1
If i <= x Then GoTo 20
If p = 2 Then Print x
If x = 100 Then MsgBox "list of prime no.": End
GoTo 10

   
End Sub

dr Ravi, I've done the programming task on the problem  to generate a list of prime no. from 1-100.

Here I attached the program:


Private Sub Command1_Click()
10 x = x + 1
i = 1
20 If (x / i) = Int(x / i) Then p = p + 1
i = i + 1
If i <= x Then GoTo 20
If p = 2 Then Form1.Print x
If x = 100 Then MsgBox "number of prime number are done": End
p = 0
GoTo 10
End Sub

For making a digital clock (sorry coz the time doesn't run by itself... user needs to press and hold enter)

Dim H, M, s As Integer

Private Sub Command1_Click()
H = 0
M = 0
s = 0
10 MsgBox "The time is" + Str(H) + " hours," + Str(M) + " minutes, and" + Str(s) + " seconds"
s = s + 1
If s >= 60 Then M = M + 1 Else GoTo 10
s = 0
If M >= 60 Then H = H + 1 Else GoTo 10
M = 0: GoTo 10


End Sub

We learned string functions today! :D

Reply to Discussion

RSS

© 2025   Created by Ravichandran.   Powered by

Report an Issue  |  Terms of Service