Re: [Tutor] Python 3 - bugs or installation problem

2015-03-04 Thread Dave Angel
On 03/04/2015 09:11 PM, boB Stepp wrote: On Wed, Mar 4, 2015 at 7:53 PM, Phil wrote: I hope this is not another embarrassingly obvious answer to a simple question. Python 3, under Kubuntu. xrange() fails whereas range() is accepted. Could this be an installation problem? etc This may fall i

Re: [Tutor] Python 3 - bugs or installation problem

2015-03-04 Thread boB Stepp
On Wed, Mar 4, 2015 at 7:53 PM, Phil wrote: > I hope this is not another embarrassingly obvious answer to a simple > question. > > Python 3, under Kubuntu. > > xrange() fails whereas range() is accepted. Could this be an installation > problem? > etc This may fall into the obvious answer. ~(:>))

[Tutor] Python 3 - bugs or installation problem

2015-03-04 Thread Phil
I hope this is not another embarrassingly obvious answer to a simple question. Python 3, under Kubuntu. xrange() fails whereas range() is accepted. Could this be an installation problem? phil@Asus:~/Python$ python3 Python 3.4.2 (default, Oct 8 2014, 13:18:07) [GCC 4.9.1] on linux Type "help

Re: [Tutor] Fixed Vector Array

2015-03-04 Thread Dave Angel
On 03/04/2015 10:40 AM, niyanax...@gmail.com wrote: Need help trying to implement insert, remove, indexof, and reverse functions. I tried to do them but am not sure if it is correct. I am struggling with arrays. This is python and using ezarrays. I don't know any Python that includes somet

Re: [Tutor] Fixed Vector Array

2015-03-04 Thread Danny Yoo
On Wed, Mar 4, 2015 at 9:51 AM, Danny Yoo wrote: > Can someone point out how to write and run tests to Ni'Yana? I'm busy at > the moment. Thanks! I'm still too busy to answer your question directly, but I can point to you a recent post on unit testing a class: https://mail.python.org/pipe

Re: [Tutor] List of ints

2015-03-04 Thread Albert-Jan Roskam
- Original Message - > From: Mark Lawrence > To: tutor@python.org > Cc: > Sent: Wednesday, March 4, 2015 10:20 AM > Subject: Re: [Tutor] List of ints > > On 04/03/2015 00:25, Steven D'Aprano wrote: >> On Tue, Mar 03, 2015 at 04:50:41PM +1000, Phil wrote: >> >>> count [0] += 1 >>>

[Tutor] Strengths & weaknesses of Python lists compared to "old school" arrays [Was "Fixed Vector Array"]

2015-03-04 Thread boB Stepp
On Wed, Mar 4, 2015 at 12:04 PM, Alan Gauld wrote: > On 04/03/15 15:40, niyanax...@gmail.com wrote: >> >> Need help trying to implement insert, remove, indexof, and reverse >> functions. >> >> I tried to do them but am not sure if it is correct. I am struggling with >> arrays. > > > I;m not sure w

Re: [Tutor] Fixed Vector Array

2015-03-04 Thread Alan Gauld
On 04/03/15 15:40, niyanax...@gmail.com wrote: Need help trying to implement insert, remove, indexof, and reverse functions. I tried to do them but am not sure if it is correct. I am struggling with arrays. I;m not sure why so many courses seem to insist on teaching old school arrays using P

[Tutor] Fwd: Re: Fixed Vector Array

2015-03-04 Thread Danny Yoo
Can someone point out how to write and run tests to Ni'Yana? I'm busy at the moment. Thanks! -- Forwarded message -- From: Date: Mar 4, 2015 9:46 AM Subject: Re: [Tutor] Fixed Vector Array To: "Danny Yoo" Cc: I am not sure how to test this. I do not understand arrays fully but

Re: [Tutor] Fixed Vector Array

2015-03-04 Thread Danny Yoo
On Wed, Mar 4, 2015 at 7:40 AM, wrote: > Need help trying to implement insert, remove, indexof, and reverse functions. > > I tried to do them but am not sure if it is correct. I am struggling with > arrays. Hi Niyana, Programmers generally use unit tests to double-check their programs. Do you

[Tutor] Fixed Vector Array

2015-03-04 Thread niyanaxx95
Need help trying to implement insert, remove, indexof, and reverse functions. I tried to do them but am not sure if it is correct. I am struggling with arrays. This is python and using ezarrays. Assignment: A fixed vector is very similar to the vector in that it is a sequence container th

Re: [Tutor] List of ints

2015-03-04 Thread Mark Lawrence
On 04/03/2015 00:25, Steven D'Aprano wrote: On Tue, Mar 03, 2015 at 04:50:41PM +1000, Phil wrote: count [0] += 1 This fails with the following error; TypeError: 'int' object is not iterable I know that others have already solved the problem, but here is something which might help you solve

Re: [Tutor] List of ints

2015-03-04 Thread Alan Gauld
On 03/03/15 23:44, Mark Lawrence wrote: Having never heard of QPython I've just looked it up, so for those who don't know from http://qpython.com/ it's "a script engine which runs Python programs on android devices". I doubt if there is much experience on this list with it although you might ge