[Year 12 SofDev] Programming Help
Kevork KROZIAN
kkrozian at ringwoodsc.vic.edu.au
Wed Apr 30 12:55:23 EST 2014
Hi Folks,
I know VB is the overwhelming language of choice for SD teachers. Whilst we have some resources for VB.NET programming at http://www.edulists.com.au/sofdev/index.htm , wouldn't it be wonderful if we could get perhaps a graduated set of worksheets/lessons/tasks that could be shared by others especially those who are struggling and would love some help ?
I am more the PHP, Java, C# type of person and don't have a ready made set of tasks to pass on in VB , but since around 90% of teachers do choose VB, perhaps some could help to make Victoria's and others' lives a little more manageable when faced with something as challenging as a new Yr 12 course and no programming practice for many years.
Kind Regards
Kevork Krozian
IT Pathways Manager
Ringwood Trade Training Facility
Tel: 0419 356 034
From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Howard, David
Sent: Wednesday, 30 April 2014 11:16 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Programming Help
There are great courses on Codecademy and Lynda.com
David Howard
Head of Learning Systems
[https://services.stmichaels.vic.edu.au/community/icons/Icon_Twitter.png]<http://twitter.com/StMichaelsGS> [https://services.stmichaels.vic.edu.au/community/icons/Icon_FB.png] <https://services.stmichaels.vic.edu.au/fb.cfm> [https://services.stmichaels.vic.edu.au/community/icons/Icon_LinkedIn.png] <https://www.linkedin.com/company/st-michael%27s-grammar-school>
25 Chapel Street, St Kilda VIC 3182 Australia
[https://services.stmichaels.vic.edu.au/community/logo/SMGS_Logo_tall_100_2013_96d.png]<https://www.stmichaels.vic.edu.au/>
t
+61 3 8530 3272
e
dhoward at stmichaels.vic.edu.au<mailto:dhoward at stmichaels.vic.edu.au>
f
+61 3 9510 3161
w
stmichaels.vic.edu.au<https://www.stmichaels.vic.edu.au/>
CRICOS Provider 00345G
Please consider the environment before printing this email
From: Victoria Farrell <FarrellV at humegrammar.vic.edu.au<mailto:FarrellV at humegrammar.vic.edu.au>>
Reply-To: Year List <sofdev at edulists.com.au<mailto:sofdev at edulists.com.au>>
Date: Wednesday, 30 April 2014 10:51 am
To: Year List <sofdev at edulists.com.au<mailto:sofdev at edulists.com.au>>
Subject: Re: [Year 12 SofDev] Programming Help
Hi Kevork
In SD I'm using VB, but I have a Computer Club for all students who want to participate in various activities. I am more familiar with Small Basic, so I have been teaching the other classes SB as I thought it's a good introduction.
Any suggestions for programming short courses would be appreciated - as I spend hours of my time updating my skills in everything else and teaching myself programming is proving too difficult.
Cheers,
Vic
From: sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Kevork KROZIAN
Sent: Wednesday, 30 April 2014 9:16 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Programming Help
Hi Victoria
What language are you using in your course ?
Kevork
Sent from my Samsung GALAXY S4 on the Telstra 4G network
-------- Original message --------
From: Victoria Farrell
Date:30/04/2014 7:51 AM (GMT+10:00)
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Programming Help
Thank you SO MUCH Peter, this has helped a lot!!!
Vic
From:sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Coventry, Peter J
Sent: Tuesday, 29 April 2014 7:06 PM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Programming Help
The program you have is slightly different in its intentions - it asks for a number n and then generates the first n prime numbers.
However it could be adapted fairly easily by modifying the exit condition for the loop. (i.e. the program would ask for the last number and then check if Num=n to exit MainLoop. The Ender section would print Array.GetItemCount(Prime)
I've added some comments to the program to hopefully explain how it works.
Disclaimer: I don't teach SD, and don't really know Small Basic - I did a fair bit of programming in another life and still enjoy the occasional dabble.
Cheers,
Peter
From:sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Victoria Farrell
Sent: Tuesday, 29 April 2014 8:27 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: [Year 12 SofDev] Programming Help
Hi,
Very new to Software Development and it's been 20 odd years since programming at Uni, I could use some help with a problem.
I recently had students involved in the Melbourne University Programming Competition and had problems with solving the following question:
A positive integer x > 1 is a prime if its only factors are 1 and x. Hence the numbers 2, 11, and 101 are primes, but 1, 9,
and 1001 are not prime*.
The input to your program is a single positive integer n. The output should be the number of primes that are _ n.
For example, if the input is 1000 then the output is 168.
* In case you're wondering, 1001 = 7 _ 11 _ 13.
Your five answers should be for
1. n = 10
2. n = 100
3. n = 100; 000
4. n = 10; 000; 000
5. n = 20; 000; 000
We decided to solve in Small Basic so as to get a handle on lops and arrays, but did not manage to solve it. I found a solution online (below) but was not able to understand how the array worked. It doesn't solve the problem exactly as it just lists the input number of primes, but it certain can calculate/select for primes.
Init:
TextWindow.WriteLine("How many Prime numbers (1-1000)? ")
N=TextWindow.ReadNumber()
IfN<1Or N>1000Then
TextWindow.WriteLine("That's All Folks!")
TextWindow.Pause()
Program.End()
EndIf
Prime="1=2;" ' Prime is an array to hold the prime numbers we find. Start by creating a single element array with value 2 - the first prime number
Num=Prime[Array.GetItemCount(Prime)] ' Num is the current number we are checking to see if it is prime. This gets the value of the last element in Prime. Could have also said Num=2
MainLoop:
Num=Num+1 ' looking at the next number to see if it is prime
Flag=1 ' Flag is 1 if Num is prime
For i=1To Array.GetItemCount(Prime) ' Loop through each of the prime numbers in the array so far,
If (Math.Remainder(Num,Prime[i])=0)Then ' check ifthe prime number is a factor of Num
'Not Prime
Flag=0 ' resets Flag
i=Array.GetItemCount(Prime) ' sets i to the last value so it exits this loop
EndIf
EndFor
If Flag=1Then 'if we get to here with Flag=1 then the number has no factors besides itself - so it is prime
Prime[Array.GetItemCount(Prime)+1]=Num 'add this number to the end of the Prime array
TextWindow.Write(Array.GetItemCount(Prime)) 'print something out
TextWindow.WriteLine(" "+Num)
if Array.GetItemCount(Prime)>=NThen 'If we have found the number of primes requested, then exit the MainLoop
Goto Ender
EndIf
EndIf
Goto MainLoop
Ender:
'TextWindow.Write("Press any key to continue...")
TextWindow.WriteLine("---")
TextWindow.Pause()
GotoInit
Can anyone give me a brief written description, or point me to an online resource that can explain how this array functions? Can anyone identify a Small Basic function more suited to this problem?
Thanks,
Vic
Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.
________________________________
Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of Ringwood Secondary College.
________________________________
Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of Ringwood Secondary College.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20140430/d1c3dea5/attachment-0001.html
More information about the sofdev
mailing list