Create a program in Python to accept input from clients of their name, weight (in pounds) and height (in inches). Calculate his/her BMI and then display a message telling them the result. Below is the table of BMI for adults:
BMI is calculated by dividing your weight in pounds by your height (in inches) squared and then multiplied by 703. In other words BMI = (W / H2 ) * 703.
BMIWeight Status
Below 18.5Underweight
18.5—24.9Normal
25.0—29.9Overweight
30.0 and AboveObese
The program should display for the client a message telling them in which range they are. Code the program as a loop so that the program will continue to run until there are no more clients. You decide what will end the program
rules that govern employee behaviour are as follows: Most employees work 37.5 hours per week. employees earn R50 000 per year. Managers earn R20 000 extra per year. employees get 15 workdays leaves a year. Managers get an extra 3 days leave per year. Secretaries must work 40 per week. Name is the only attribute you need. Required: 1. Code the classes Employee, Manager and Secretary. 2. Code an application with the main method. In this class you must code an array of type Employee with a maximum size of 20. a. Add a minimum of 10 objects to the array. You may hard-code these object values. The objects must be a mixture of Employee, Manager and Secretary. b. Display all the objects on the screen. c. Calculate, and then display, the average salary of all employees. Extra Calculate and display the cost of the leave for each employee.
Using the methods
FindSum(int, int) //returns total
FindProduct(int, int) //returns the product of the two integers
Write the main method to find and print the answer of the expression;
The function takes a 4-digit integer as parameter, validates the integer and returns 1 when the digits are in increasing order or 2 when the digits are in decreasing order or 0 when the digits are not in any order
Write statements to validate the number given below is a 4-digit integer and then to print the digits divisible by 2.
The function takes a 4-digit integer as parameter, validates the integer and returns 1 when the digits are in increasing order or 2 when the digits are in decreasing order or 0 when the digits are not in any order.
Write statements to validate the number given below is a 4-digit integer and then to print the digits divisible by 2.
int number=8459;
Create an object based on the PriceChecker class
checkerObj = PriceChecker()
# Load levelsList from the records in levelsFile
checkerObj.readLevelsFromFile()
# Display the levelsList and get user input for what actions to take
userInput = 99
while userInput != 0: checkerObj.displayList()
userInput = checkerObj.displayMenu()
if(userInput == 1):
checkerObj.addLevel()
checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
elif(userInput == 2):
checkerObj.removeLevel()
checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
elif(userInput == 3):
checkerObj.removeAllLevels() checkerObj.writeLevelsToFile() # Write levelsList to LevelsFile
Write a program to swap the numbers in even position using call by reference