https://github.com/fjmorenojr4/Soccer-Field-Revenue.git
from datetime import datetime class SoccerField: def __init__(self, games, players, rate): self.games =games self.players = players self.rate = rate self.total_revenue = 0 def pick_up (self, players,rate, m,t,w,r,f,sat,sun): game_rate = players * rate weekly_revenue = (m+t+w+r+f+sat+sun) * game_rate yearly_revenue = weekly_revenue * 45 self.total_revenue += yearly_revenue return yearly_revenue def camp (self, half_day_campers, half_day_fee,full_day_campers, full_day_fee, number_of_camps, trainer_cost, number_of_trainers ): camper_rev = (half_day_campers * half_day_fee) + (full_day_campers * full_day_fee) camp_rev_total = number_of_camps * camper_rev trainers = trainer_cost * number_of_trainers camps_rev = camp_rev_total - trainers self.total_revenue += camps_rev return camps_rev def total (self): return self.total_revenue revenue = SoccerField(10,10,10) if __name__ == '__main__': while True: user_input = int(input('1: Pick Up Soccer Revenuen2: Camp revenuen3: Total Revenuen4: Quitn>:')) if user_input in [4]: print('Program ended') break elif user_input == 1: rates = float(input('Enter game rates:n')) players = int(input('Enter Players per match:n')) monday = int(input('Enter the number of Monday Pick-up Games:n')) tuesday = int(input('Enter the number of Tuesday Pick-up Games:n')) Wednsday = int(input('Enter the number of Wednsday Pick-up Games:n')) Thursday = int(input('Enter the number of Thursday Pick-up Games:n')) Friday = int(input('Enter the number of Friday Pick-up Games:n')) Saturday = int(input('Enter the number of Saturday Pick-up Games:n')) Sunday = int(input('Enter the number of Sunday Pick-up Games:n')) revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday) print(f'Pick-up revenue is:n${revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday):,.2f}') elif user_input ==2: half_day_campers =int(input('How many half-day campers:n')) half_day_fee = float(input('What is the fee for Half-Day Campers:n')) full_day_campers = int(input('How many full-day campers:n')) full_day_fee = float(input('What is the fee for full-day campers:n')) camps = int(input(f'How many camps for {datetime.now().year}:n')) trainer_cost = float(input('Enter the trainer cost:n')) number_of_trainers = int(input('Enter the number of trainers:n')) revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers) print(f'Camp Revenue is:n${revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers):,.2f}') elif user_input == 3: print(f'Camp and Pick-Up revenue for {datetime.now().year}:n${revenue.total():,.2f}')
submitted by /u/Local-File-7151
[link] [comments]
r/learnpython https://github.com/fjmorenojr4/Soccer-Field-Revenue.git from datetime import datetime class SoccerField: def __init__(self, games, players, rate): self.games =games self.players = players self.rate = rate self.total_revenue = 0 def pick_up (self, players,rate, m,t,w,r,f,sat,sun): game_rate = players * rate weekly_revenue = (m+t+w+r+f+sat+sun) * game_rate yearly_revenue = weekly_revenue * 45 self.total_revenue += yearly_revenue return yearly_revenue def camp (self, half_day_campers, half_day_fee,full_day_campers, full_day_fee, number_of_camps, trainer_cost, number_of_trainers ): camper_rev = (half_day_campers * half_day_fee) + (full_day_campers * full_day_fee) camp_rev_total = number_of_camps * camper_rev trainers = trainer_cost * number_of_trainers camps_rev = camp_rev_total – trainers self.total_revenue += camps_rev return camps_rev def total (self): return self.total_revenue revenue = SoccerField(10,10,10) if __name__ == ‘__main__’: while True: user_input = int(input(‘1: Pick Up Soccer Revenuen2: Camp revenuen3: Total Revenuen4: Quitn>:’)) if user_input in [4]: print(‘Program ended’) break elif user_input == 1: rates = float(input(‘Enter game rates:n’)) players = int(input(‘Enter Players per match:n’)) monday = int(input(‘Enter the number of Monday Pick-up Games:n’)) tuesday = int(input(‘Enter the number of Tuesday Pick-up Games:n’)) Wednsday = int(input(‘Enter the number of Wednsday Pick-up Games:n’)) Thursday = int(input(‘Enter the number of Thursday Pick-up Games:n’)) Friday = int(input(‘Enter the number of Friday Pick-up Games:n’)) Saturday = int(input(‘Enter the number of Saturday Pick-up Games:n’)) Sunday = int(input(‘Enter the number of Sunday Pick-up Games:n’)) revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday) print(f’Pick-up revenue is:n${revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday):,.2f}’) elif user_input ==2: half_day_campers =int(input(‘How many half-day campers:n’)) half_day_fee = float(input(‘What is the fee for Half-Day Campers:n’)) full_day_campers = int(input(‘How many full-day campers:n’)) full_day_fee = float(input(‘What is the fee for full-day campers:n’)) camps = int(input(f’How many camps for {datetime.now().year}:n’)) trainer_cost = float(input(‘Enter the trainer cost:n’)) number_of_trainers = int(input(‘Enter the number of trainers:n’)) revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers) print(f’Camp Revenue is:n${revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers):,.2f}’) elif user_input == 3: print(f’Camp and Pick-Up revenue for {datetime.now().year}:n${revenue.total():,.2f}’) submitted by /u/Local-File-7151 [link] [comments]
https://github.com/fjmorenojr4/Soccer-Field-Revenue.git
from datetime import datetime class SoccerField: def __init__(self, games, players, rate): self.games =games self.players = players self.rate = rate self.total_revenue = 0 def pick_up (self, players,rate, m,t,w,r,f,sat,sun): game_rate = players * rate weekly_revenue = (m+t+w+r+f+sat+sun) * game_rate yearly_revenue = weekly_revenue * 45 self.total_revenue += yearly_revenue return yearly_revenue def camp (self, half_day_campers, half_day_fee,full_day_campers, full_day_fee, number_of_camps, trainer_cost, number_of_trainers ): camper_rev = (half_day_campers * half_day_fee) + (full_day_campers * full_day_fee) camp_rev_total = number_of_camps * camper_rev trainers = trainer_cost * number_of_trainers camps_rev = camp_rev_total - trainers self.total_revenue += camps_rev return camps_rev def total (self): return self.total_revenue revenue = SoccerField(10,10,10) if __name__ == '__main__': while True: user_input = int(input('1: Pick Up Soccer Revenuen2: Camp revenuen3: Total Revenuen4: Quitn>:')) if user_input in [4]: print('Program ended') break elif user_input == 1: rates = float(input('Enter game rates:n')) players = int(input('Enter Players per match:n')) monday = int(input('Enter the number of Monday Pick-up Games:n')) tuesday = int(input('Enter the number of Tuesday Pick-up Games:n')) Wednsday = int(input('Enter the number of Wednsday Pick-up Games:n')) Thursday = int(input('Enter the number of Thursday Pick-up Games:n')) Friday = int(input('Enter the number of Friday Pick-up Games:n')) Saturday = int(input('Enter the number of Saturday Pick-up Games:n')) Sunday = int(input('Enter the number of Sunday Pick-up Games:n')) revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday) print(f'Pick-up revenue is:n${revenue.pick_up(rates,players, monday, tuesday, Wednsday,Thursday,Friday,Saturday,Sunday):,.2f}') elif user_input ==2: half_day_campers =int(input('How many half-day campers:n')) half_day_fee = float(input('What is the fee for Half-Day Campers:n')) full_day_campers = int(input('How many full-day campers:n')) full_day_fee = float(input('What is the fee for full-day campers:n')) camps = int(input(f'How many camps for {datetime.now().year}:n')) trainer_cost = float(input('Enter the trainer cost:n')) number_of_trainers = int(input('Enter the number of trainers:n')) revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers) print(f'Camp Revenue is:n${revenue.camp(half_day_campers,half_day_fee,full_day_campers,full_day_fee, camps, trainer_cost,number_of_trainers):,.2f}') elif user_input == 3: print(f'Camp and Pick-Up revenue for {datetime.now().year}:n${revenue.total():,.2f}')
submitted by /u/Local-File-7151
[link] [comments]