• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
October 26, 2022 |590 Views
Python Program to Calculate and Print Bonus & Gross using Basic Salary
  Share   Like
Description
Discussion

Python Program to print Bonus and Gross using Basic Salary

In this video, we will write a python program to Calculate and Print bonuses and Gross salary. 
Below is the list of approaches that we will cover in this section:

The basic salary is taken as input from the user. Bonus is allotted at x% rate as per the choice of the user. Calculate the bonus and add it to the actual salary to find the gross salary

Method 1: Without function/Using Formula

Taking the inputs, basic salary and bonus from the user. Calculate the bonus in terms of basic salary. Add the bonus amount to the basic salary to find the gross salary

Formulae:

Bonus amount = (Bonus/Basic) * 100
Gross salary = Bonus + Basic Salary

Method 2: With the function

Take the bonus and basic salary as input from the user to pass them as an argument. Thus, find the bonus amount and add it to deduce the gross salary.