Re: [Tutor] create class Pet

2015-06-16 Thread Stephanie Quiles
> sorry this is the correct error. it allows me to enter name and age but then > i get the message: /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/stephaniequiles/PycharmProjects/untitled3/pets.py what is the name of the pet?: riley Please enter a type of pet: cat Enter

Re: [Tutor] Help understanding list comprehensions

2015-06-16 Thread Anubhav Yadav
I am sorry I didn't posted my code. I had solved this question long back on hackerrank, and I couldn't figure out why this behaviour was seen in this problem, so I had posted this question on their discussion forum. Couldn't get a good answer so I decided to post here. Luckily I found the revision

Re: [Tutor] Help understanding list comprehensions

2015-06-16 Thread Alan Gauld
On 16/06/15 20:39, Anubhav Yadav wrote: I am sorry I didn't posted my code. I had solved this question long back on hackerrank, and I couldn't figure out why this behaviour was seen in this problem, so I had posted this question on their discussion forum. Couldn't get a good answer so I decided

Re: [Tutor] create class Pet

2015-06-16 Thread Mark Lawrence
On 16/06/2015 17:45, Stephanie Quiles wrote: Hello, Having trouble figuring out why this program is not running. could someone please take a look and see where I am going wrong? Here is the error message i am getting : /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/ste

Re: [Tutor] Help understanding list comprehensions

2015-06-16 Thread Válas Péter
What is the exact meaning of "marks" and "lowest" in your script? Where are they defined?0 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] clickable listbox from sqlite database.

2015-06-16 Thread Alan Gauld
On 16/06/15 13:47, Ali Moradi wrote: i want to fill the listbox from my database which contains of one table (Words) and two fields (English) and (Esperanto), how can i do that? i want the program to be the same just the words loaded from my sqlite database. Do you know SQL? And if so do you k

Re: [Tutor] Help understanding list comprehensions

2015-06-16 Thread Alan Gauld
On 16/06/15 16:45, Anubhav Yadav wrote: I have a doubt. So have I. I can't se your code so I don't know what's happening. Don't make us guess, show us the code. I had a list like this [['Varun', 19.0], ['Kakunami', 19.0], ['Harsh', 20.0], ['Beria', 20.0], ['Vikas', 21.0]] But its not assig

Re: [Tutor] create class Pet

2015-06-16 Thread Alan Gauld
On 16/06/15 17:45, Stephanie Quiles wrote: File "/Users/stephaniequiles/PycharmProjects/untitled3/pets.py", line 2, in def main(get_name=name): NameError: name 'name' is not defined There is an inconsistency here. The code you have shown does not match the error. The error says the d

[Tutor] create class Pet

2015-06-16 Thread Stephanie Quiles
Hello, Having trouble figuring out why this program is not running. could someone please take a look and see where I am going wrong? Here is the error message i am getting : /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/stephaniequiles/PycharmProjects/untitled3/pets.py

[Tutor] Help understanding list comprehensions

2015-06-16 Thread Anubhav Yadav
I have a doubt. I had a list like this [['Varun', 19.0], ['Kakunami', 19.0], ['Harsh', 20.0], ['Beria', 20.0], ['Vikas', 21.0]] I am using a for loop to del the rows with the lowest value like this: for row in marks: if row[1] == lowest: marks.remove(row) But after running this loo

[Tutor] clickable listbox from sqlite database.

2015-06-16 Thread Ali Moradi
Hi, you got what i mean thanks, your code (http://pastebin.com/VbaVKJgj) was so good. now i want to do two more things. i want to fill the listbox from my database which contains of one table (Words) and two fields (English) and (Esperanto), how can i do that? i want the program to be the same jus