Advertisement
horozov86

class_Player_Football_Team_Generator

Jul 6th, 2023
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. class Player:
  2.     def __init__(self, name, sprint, dribble, passing, shooting):
  3.         self.__name = name
  4.         self.__sprint = sprint
  5.         self.__dribble = dribble
  6.         self.__passing = passing
  7.         self.__shooting = shooting
  8.        
  9.     def name(self):
  10.         return self.__name
  11.        
  12.     def __str__(self):
  13.         result = f"Player: {self.__name}\n"
  14.         result += f"Sprint: {self.__sprint}\n"
  15.         result += f"Dribble: {self.__dribble}\n"
  16.         result += f"Passing: {self.__passing}\n"
  17.         result += f"Shooting: {self.__shooting}"
  18.         return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement