#User defined function not printing
12 messages · Page 1 of 1 (latest)
What does the curly braces syntax mean? {h} instead of just h for instance
I don’t know. It’s what my professor said to use on a different multi element udf
I tried a variant without them and got the same result
first when i did the exact same script you have it showed TypeError: unsupported operand type(s) for *: 'int' and 'set'
h = 0
q = 17
d = 24
n = 16
p = 12
def piggybank(h, q, d, n, p):
print(50*h+25*q+10*d+5*n+1*p)
piggybank(h,q,d,n,p)
once i removed them from being sets it worked and here is the outcome
757
hope that answer helped
That helped immensely. Thank you
I also used it on a different udf that uses words as opposed to algebra and it worked great
And sorry about not copying and pasting my code. I just realized that you had to type that whole mess
XD i got lost midway typing that equation XD
.banom you've been given 16 kudos from summurialeclipse.9290 and 1 other member.