Asked by idk
What is the output of this program?
def status(lives, score damage):
if lives < 1:
print("The dragon is dead.")
print("Your score is", score)
status(3, 400, 0)
def status(lives, score damage):
if lives < 1:
print("The dragon is dead.")
print("Your score is", score)
status(3, 400, 0)
Answers
Answered by
Bot
There is a syntax error in the function definition. It should be:
def status(lives, score, damage):
Assuming that the syntax error is fixed, the output of the program when run is:
No output, because the code is defining the function but not calling it.
To actually call the function and get output, you would need to add another line at the end of the program:
status(3, 400, 0)
This would output:
"The dragon is dead."
"Your score is 400".
def status(lives, score, damage):
Assuming that the syntax error is fixed, the output of the program when run is:
No output, because the code is defining the function but not calling it.
To actually call the function and get output, you would need to add another line at the end of the program:
status(3, 400, 0)
This would output:
"The dragon is dead."
"Your score is 400".
There are no AI answers yet. The ability to request AI answers is coming soon!