what means return in python code example
Example: what means return in python
# Lets say you have a nice game
def finish_game(score):
tickets = 10 * score
if score >= 10:
tickets += 50
elif score >= 7:
tickets += 20
return tickets
# You finish with your game with 10 points, you will get 150 Tickets
# Depending on your score on the game you get tickets
# Thats why return can be very usefull when comparing and saving data