[Tutor] Is this a scope issue?

2017-03-05 Thread Rafael Skovron
This project compares two text files with parcel numbers. I think I'm messing up the function call. I'm getting this error: Traceback (most recent call last): File "amador.py", line 48, in remaining_parcels(auctionlist,removedlist) NameError: name 'auctionlist' is not defined import re

[Tutor] collections.Callable functionality

2017-03-05 Thread ramakrishna reddy
Hi, Can you please explain the functionality of collections.Callable ? If possible with a code snippet. I could not find a good explanation on google. Thanks, Ram. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: h

Re: [Tutor] Tables in Tkinter

2017-03-05 Thread Alan Gauld via Tutor
On 04/03/17 01:47, Alan Gauld via Tutor wrote: >> Can you please guide me to an example related to this problem? I had a play and here is a simple DisplayTable widget. Its still not a scrollable frame (although i might get round to that later...) But it takes a list of headings and a 2D list of

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Colin Caine
It's good that you have thought about the different cases, but now your function is very long. You can make it a lot shorter and simpler if you think about what calculations you want to do with different inputs and what calculation can be shared. On 5 Mar 2017 19:49, "Sri Kavi" wrote: > I’ve im

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Sri Kavi
I’ve improved it a bit to meet the following conditions: 1. type(base) == int and exponent == 0 2. base == 0 < exponent 3. (base > 0 or base < 0) and exponent > 0 4. base > 0 > exponent 5. base < 0 > exponent 6. base == 0 > exponent def power(base, exponent): if type(base)

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Alex Kleider
On 2017-03-04 19:06, Sri Kavi wrote: I'm sorry I confused you all. I was trying to reply to Tasha Burman, but I was in digest mode and I didn't know how to turn it off. So far I've been just a lurker here. I also don't know if it's a school assignment. Here's how I would do it. def power(base

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Alex Kleider
On 2017-03-05 01:42, Sri Kavi wrote: I’ve improved it a bit to meet the following conditions: 1. type(base) == int and exponent == 0 2. base == 0 < exponent 3. (base > 0 or base < 0) and exponent > 0 4. base > 0 > exponent 5. base < 0 > exponent 6. base == 0 > exponent def power(base, exponent):

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Alex Kleider
On 2017-03-05 02:24, Peter Otten wrote: Sri Kavi wrote: Like I just said in my other message, I was trying to reply to Tasha Burman, but I was in digest mode and I didn't know how to change my subscription options in order to reply to individual messages. I also don't know if it's an assignment

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Peter Otten
Sri Kavi wrote: > Like I just said in my other message, I was trying to reply to Tasha > Burman, but I was in digest mode and I didn't know how to change my > subscription options in order to reply to individual messages. I also > don't know if it's an assignment, but I'm a beginner learning to pr

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Sri Kavi
Like I just said in my other message, I was trying to reply to Tasha Burman, but I was in digest mode and I didn't know how to change my subscription options in order to reply to individual messages. I also don't know if it's an assignment, but I'm a beginner learning to program, too :) >What if a

Re: [Tutor] Calculate 4**9 without using **

2017-03-05 Thread Sri Kavi
I'm sorry I confused you all. I was trying to reply to Tasha Burman, but I was in digest mode and I didn't know how to turn it off. So far I've been just a lurker here. I also don't know if it's a school assignment. Here's how I would do it. def power(base, exponent): result = base for _