[Year 12 SofDev] Should I teach lists?
Guy Flaherty
Guy.Flaherty at xavier.vic.edu.au
Mon Mar 7 13:47:01 AEDT 2016
Python does have an array type which is similar to what other languages define as an array. It limits the array to a specific type. It may be useable, especially to contrast with a 'list' in python to help students understand the pythonic way of doing things!
https://docs.python.org/2/library/array.html
You can use it like the following:
>>>from array import array
>>>a = array('I',[1,2,3,4])
>>>a[1]
2
>>>a.append('a')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: an integer is required (got type str)
The 'I' is the typecode which forces the array to be restricted to the type this typecode represents (int's in this case). It might be useful if you are using python and need to explain/demo arrays.
Guy Flaherty
From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Croke, Daryl D
Sent: Monday, 7 March 2016 12:06 PM
To: Year 12 Software Development Teachers' Mailing List <sofdev at edulists.com.au>
Subject: Re: [Year 12 SofDev] Should I teach lists?
Hi all
Python doesn't do arrays as such, but you can make list within list and make them function like an array, so surely that's the point.
see: http://www.i-programmer.info/programming/python/3942-arrays-in-python.html
What are we trying to achieve? What code do we require to achieve that?
Even though we can have mixed data type lists in Python it would be best to avoid that.
Cheers
Daryl Croke
Mount Ridley College
8338 3600
http://mountridleycollege.vic.edu.au/
keep on coding
http://geekstuff.global2.vic.edu.au/
http://physicalcomputing.global2.vic.edu.au/
________________________________
From: sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [sofdev-bounces at edulists.com.au] on behalf of Laurie Savage [08327998 at pvgc.vic.edu.au]
Sent: Monday, 7 March 2016 11:30 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Should I teach lists?
I'm no expert here so I'm very happy to be corrected but this poses a problem with PHP and Python where arrays and lists are interchangeable. In PHP and Python arrays can contain elements of different types: e.g.
$fred = array("Fred", "Smith", 40, 78.50) so $fred[2] + $fred[3] = 118.5 but $fred[0] + $fred[1] should throw an error in PHP, not in Python.
or
$fred = array("FName"=>"Fred", SName"=>"Smith", "Age"=>40, "Weight"=> 78.5)
I seem to remember having this discussion with Kevork back in 2010!
Laurie
Laurie Savage
IT Teacher/Assessment and Reporting Coordinator
Pascoe Vale Girls College
On 7 Mar 2016, at 11:09 AM, Chris Bucknell <Chris.Bucknell at haileybury.vic.edu.au<mailto:Chris.Bucknell at haileybury.vic.edu.au>> wrote:
Hi All,
Like Damien I don't encourage my students to use List and Dictionaries because in they tend to confuse them and arrays when it comes to exams. So I find it simpler to avoid them and get the students to understand what's on the study design and what they'll be assessed on.
Cheers
Chris Bucknell
Head of CDT; Coord, Internal Exam; House Tutor
+61 3 9904 6360
Chris.Bucknell at haileybury.vic.edu.au<mailto:%7bemail%7d>
www.haileybury.vic.edu.au<http://www.haileybury.vic.edu.au/>
From: sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [mailto:sofdev-bounces at edulists.com.au] On Behalf Of ATKINSON-BUCK, Damien
Sent: Monday, 7 March 2016 10:38 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Should I teach lists?
Hi Ben,
Personally steer away from Lists and Dictionaries, even though they're technically easier to use (and in at least the case of dictionaries, sometimes faster) purely because I don't want to add any extra confusion for the students. When it comes to exams, they are likely to be asked questions about arrays. If they put in an example in list format, an exam assessor may not get that and give them zero.... Especially if you look at RemoveAt() and other list shortcuts.
That's just my overly cautious approach, quite possibly I'm underselling the students ability to discriminate the best time to use it.
Cheers
Damien
Damien Atkinson-Buck
Head of Learning Area: Technology/Arts
<image001.png><UrlBlockedError.aspx>
<image002.jpg><http://www.ivanhoe.com.au/>
The Ridgeway, Ivanhoe VIC 3079 Australia
p. +61 3 9490 3848
e. damien.atkinson-buck at ivanhoe.com.au<mailto:damien.atkinson-buck at ivanhoe.com.au>
w. www.ivanhoe.com.au<http://www.ivanhoe.com.au/>
<image003.png><http://www.facebook.com/IvanhoeGrammarSchool> <image004.png><http://twitter.com/ivanhoegrammar>
From: Baas, Benjamin B [mailto:baas.benjamin.b at edumail.vic.gov.au]
Sent: Monday, 7 March 2016 9:49 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: [Year 12 SofDev] Should I teach lists?
Hi all,
I'm contemplating whether on not I should teach my students about Lists in C# and VB as they will be of more use to them then Arrays when doing their SAT (List are dynamic and have more functionality). I just wanted to know what peoples thoughts are on this and if they go beyond the data collections mentioned in the study design. The SD just mentions Arrays and Records.
Cheers,
Ben.
Benjamin Baas
<image005.png> Alkira Secondary College
* Nurture Ave, Cranbourne North | PO Box 4314, Narre Warren South 3805
' +61 3 5991 3500 6 +61 3 5991 3599 * www.alkirasecondarycollege.com.au<http://www.alkirasecondarycollege.com.au/>
Alkira Secondary College believes in Personalised learning for all, and Respect for the individual
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 Training.
Privacy, Virus and Copyright Warning
The information contained in this electronic message (e-mail), and any files transmitted with it:
* is intended for the named recipients only. If you have received this in error, please advise the sender and delete it and any copies immediately;
* Any personal information in this email must be used in accordance with the Privacy Act 1988 and this always applies even if it has been sent to you in error.
* represents the views of the sender and does not necessarily represent the views or formal advice of Ivanhoe Grammar School;
* may be subject to Copyright, so no further use should be made of it without the author's permission.
The School does not represent or warrant that the email or any files attached do not contain errors or are free from computer viruses or other defects nor does it accept responsibility for any loss or damage resulting directly or indirectly from the use of the email or any attached files.
________________________________
This email, including any attachments, is confidential. If you are not the intended recipient you must not copy, use, disclose, distribute or rely on this information. If you have received this email in error, please notify the sender immediately by reply email and delete the email from your system. Confidentiality and legal privilege attached to this communication are not waived or lost by reason of mistaken delivery to you. Haileybury does not guarantee that this email is unaffected by computer virus, corruption or other defects. Haileybury monitors all incoming and outgoing email for compliance with its IT Policies. ABN: 34 004 228 906
_______________________________________________
http://www.edulists.com.au<http://www.edulists.com.au/> - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au<http://www.vcaa.vic.edu.au/> - Victorian Curriculum and Assessment Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au<http://www.vitta.org.au/> - VITTA Victorian Information Technology Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
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 Training.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20160307/2db6577f/attachment-0001.html
More information about the sofdev
mailing list