Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE IN PYTHON You have been hired by the Abahani football club to write a function that will calculate the total bonus on the yearly

CODE IN PYTHON

You have been hired by the Abahani football club to write a function that will calculate the total bonus on the yearly earnings of each player for the total goals they have scored.

Since the number of players will vary, you decide to use the "*args" technique

For each player: pass the name, yearly earning, the total goal scored this season, bonus percent per goal.

Additionally,

If the goal scored is above 30, add an extra bonus of 10000 taka.

If it is between 20 and 30 inclusive, add an extra 5000 taka.

[ For this task, no need to take any input from the user. Call the functions and print the values inside the function. ]

=====================================================

Example1: cal_bonus("Neymar", 1200000, 35, 5)

bonus = 35 * (5 / 100 * 1200000) + 10000 = 2110000

Function call: cal_bonus("Neymar", 1200000, 35, 5) Output: Neymar earned a bonus of 2110000 Taka for 35 goals.

=====================================================

Example2: Function call: function_name("Neymar", 1200000, 30, 10, "Jamal", 700000, 19, 5) Output: Neymar earned a bonus of 3605000 Taka for 30 goals. Jamal earned a bonus of 665000 Taka for 19 goals.

=====================================================

Example3: Function call: function_name("Neymar", 1200000, 35, 5, 'Jamal', 700000, 19, 8, 'Luis', 80000, 25, 10)) Output: Neymar earned a bonus of 2110000 Taka for 35 goals. Jamal earned a bonus of 1064000 Taka for 19 goals. Luis earned a bonus of 205000 Taka for 25 goals.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

Define the terms management science and operations research.

Answered: 1 week ago