I'm new to Python. Just putting that out there.
What I want to do is to add the output of a function to a string literal that another function outputs.
This is the case:
**
def prime(n):
**blahh blah blah....**
if z == True:
return " and prime"
else:
return ""
def happyPrime(n):
**more blah blah blah**
if n == 1:
print ("Number is happy%s!" % prime)
break
if n in visited:
print ("Number is sad%s!" % prime)
visited.add(n)
[Ignore the indentations in the code snippet, StackOverflow made them come out wrong.] The intended result is, of course, that where the modulo is it adds what the other function returned. I think I may be approaching it the wrong way, though.