Is there a reason to be casting everything to
print() can handle numbers just fine, and we should be returning a number to the caller, not a string.
Yep. Good point re: str(print). You are right. It is unnecessary.
I have been doing a lot of formatting str and num in sentences, I got carried away.
had this problem as well. nothing i did would let me clear it. quite frustrating
Can this be an option?
return print( str(num) + ', ’ + str((num2)) + ', ’ + str((num3)) + ', and return ’ + str((num*3)) )
It fits the requirement, but I don’t know if something wrong.
I think the expected answer is ‘number’ not ‘string’ nor ‘str(number)’.
Unlike to our human eyes, they might be totally different to that of machine.
I am having the exact same problems. Even though my code returns a value I still get a message saying, "
first_three_multiples(5) returned None, expected 15."
I rewrote the code to just return the number 15. I converted it into a string, I converted it into an integer, but I still got the same result.
No matter what I do I can’t seem to clear this lesson. Does anybody have a solution that works?
The thing to do here is to go back to that return statement and be sure it doesn’t include a
str value in the return.
None which will then be returned to the caller.
Oh, I see what I am doing wrong. It wanted me to print the three values and return only the third. I should have read more carefully.
Thanks for your help.