You'll recall we used some data returned from a function:
decision = input("You come to a junction. Turn left or right [L,R]: ")
if decision == "L" or decision == "l":
print("You turn left and see a terrible ogre and a horrible troll!")
rounds = fight(2, "Ogre")
print("You fought it for",rounds,"rounds")
rounds = fight(3, "Troll")
print("You fought it for",rounds,"rounds")
What do you think is wrong with this code (hint: it's something about how it prints)?
[Home > Part 4 > Next]