473,545 Members | 1,981 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Request Help Debugging Program

On 24 Juli, 00:30, Samir <spytho...@gmai l.comwrote:
from math import sqrt

def findSumOfDiviso r(n):
* * return sum(divisor) * * * * * * * *# return the sum of the
for i in range(2,10): * * * * * * * * *# loop through integers 2
through 9
* * * * sum = findSumOfDiviso r(i) * * *# then find the sum of its divisors
Traceback (most recent call last):
* File "pe_prob021.py" , line 19, in <module>
* * sum = findSumOfDiviso r(i) * * *# then find the sum of itsdivisors
* File "pe_prob021.py" , line 12, in findSumOfDiviso r
* * return sum(divisor) * * * * * * * *# return the sum of the
TypeError: 'int' object is not callable
'int' object is not callable... hmmm...
Traceback (most recent call last):
File "<pyshell#2 1>", line 1, in <module>
TypeError: 'int' object is not callable
>>divisor = 1
sum = 42
sum(divisor )
Traceback (most recent call last):
File "<pyshell#2 6>", line 1, in <module>
TypeError: 'int' object is not callable

That must be it.
No debugging, just reading the error message and the code...
Jul 23 '08 #1
0 692

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have a funciton inVB DLL Function BuildSqlWhereFromHTML(ByRef AspReq As ASPTypeLibrary.Request, _ ByRef AspSes As ASPTypeLibrary.Session) As String
by: feng | last post by:
I have a VB.Net program that consumes a web service. When calling the web service from my program, I would like to be able to capture and evaluate the request xml going out and the response xml that comes back. I think this is very important in debugging (that's what I am doing now). But I couldn't figour out how to do it. Could some one show...
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE")...
by: Max | last post by:
Due to the behaviour of a particular COM object, I need to ensure that a request for a particular ASP page is finalized before another request for the page is processed. Does IIS have a way to ensure that subsequent requests will be queued until the current request is completed? If not, can IIS be configured to use seperate processes to...
by: Doug Robertson | last post by:
First off, I'm a hardware/OS guy. I just write code on the side and I'm completely self taught - so bear in mind my total lack of expertise. I have a program originally written in VB2003 using the dotnet 1.1 framework. The program makes extensive use of Win32 API calls to help manage and track remote access sessions with out clients. I've...
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm running VS 2003/ASP.NET 1.1.4322.0 on XP SP2 All of a sudden I started to getting... "Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request. Make sure the server is operating correctly. Verify there is no syntax errors in the web.config by doing a...
by: Benny | last post by:
I have been trying to instal AutoCAD 2008 on a single PC and get the following Microsoft .NET Framework security error. I have updated to the latest .NET Framework 2.0 software, however, this error occurred with only v1.1 installed. I also got the same error when trying to install an old ACAD 2005 version (as a check). I have successfully...
by: stimpy_cm | last post by:
Hi everyone, I’m not a programmer but have a little notion about how things work. I recently downloaded an emulator for my calculator (Texas Instruments Voyage 200), the program uses a library created for .Net framework 1.0 and 1.1. I also activated the compatibility mode for Windows XP SP2 (Which it was the OS the programs were created for)....
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who...
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use some of the tools provided on the command-line. If you hate the command line tools, get over it since you’re bound to be using them at some point in your...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.