class Task2:
def zerocheck(num1, num2, num3):
if num1 == 0 or num2 == 0 or num3 == 0:
return True
else:
return False
def ordered3(num1, num2, num3):
if num1 < num2 < num3:
return True
else:
return False
def modcount(m, n):
numVal = 0
inc = 1
while inc <= n:
if inc%m == 0:
numVal += 1
inc += 1
return numVal
def helloworld(name):
print("Hello World, my name is %s", name)
def printasterisks(n):
outputStr = ""
inc = 0
if n < 0:
n = 0
if n > 75:
n = 75
while inc <= 75:
outputStr += '*'
inc += 1
testObject = Task2()
print("Class functions test:\n")
firstNum = input("Enter first number for zerocheck: ")
secondNum = input("Enter second number for zerocheck: ")
thirdNum = input("Enter third number for zerocheck: ")
testObject.zerocheck(firstNum,secondNum,thirdNum)
raw_input("Press any key to continue...")
In the line where zerocheck is actually called, I get an exception saying I passed in 4 arguments, whereas the function is only written to accommodate 3. I fail to see how that's possible. Could someone lead me to why it would be trying to take four parameters?
EDIT: After some more testing, I noticed all functions are having this issue, not just zerocheck.
This post has been edited by WTFsandwich: 19 October 2010 - 01:54 PM

New Topic/Question
Reply




MultiQuote





|