+ 1
Was i wrong ?
I was doing python learning course when i got this code and was asked for output def order(): def prepare(): return "Your meal is being prepared!" status = prepare() return status order() When i chose the otion that said No Output the module said it was a wrong answer. Can someone explain ?
3 Antworten
+ 5
Ashish Ch ,
it would be helpful if you could share some more details:
> platform you are working on: ios, android, web
> name of the python tutorial (if it is from sololearn)
> name of the lesson / exercise
as already mentioned by Ipang, the print statement is missing.
instead of just calling order(), you can try:
print(order())
+ 3
If that was all there is in the code, you were right to say that there is no output, for there was no call to print() function.
0
Why are you defining one function within another?