what means return in python

Solutions on MaxInterview for what means return in python by the best coders in the world

showing results for - "what means return in python"
Sohan
30 Apr 2019
1# Lets say you have a nice game
2
3def finish_game(score):
4  tickets = 10 * score
5  if score >= 10:
6    tickets += 50
7  elif score >= 7:
8    tickets += 20
9  return tickets
10
11# You finish with your game with 10 points, you will get 150 Tickets
12# Depending on your score on the game you get tickets
13# Thats why return can be very usefull when comparing and saving data
queries leading to this page
return pythonwhat means return in python