+ 2
How do I run tests when doing the practice problems?
I have written a function which solves the problem, then I run the tests and I get 'no output' - do I need to write something else in the code to get the tests to run properly? (I'm using Python 3) thanks
4 odpowiedzi
0
Thank you. This still doesn't work though. Just wondering if I'm inputting it right. Is there a specific code to input to run in order to pass the test cases? Like input() or something?
0
Thank you, but I'm still having problems. E. G for the Popsicles challenge, this is my python code. It fails all tests:
def giveoreat(siblings,popsicles):
if floor(popsicles/siblings) == popsicles / siblings:
return 'give away'
else:
return 'eat them yourself'
a = giveoreat(input())
print(a)
Anything I'm doing wrong here? Thanks