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
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
Letter, Digit or Special Character
You are given a character as input. Check if the given input is a Lowercase Letter or Uppercase Letter or Digit or a Special Character.
Input
The first line of input is a single character N.
Explanation
In the given example character is
9. So, the output should be Digit.
Sample Input 1
9
Sample Output 1
Digit
Sample Input 2
A
Sample Output 2
Uppercase Letter
Remove Vowels in a Sentence
You are given a sentence. Write a program to remove all the vowels in the given sentence.
The first line of input is a string N.
Explanation
In the example given a sentence
Hello World, the sentence contains vowels e, o.
So, the output should be
Hll Wrld.
Sample Input 1
Hello World
Sample Output 1
Hll Wrld
Sample Input 2
Once upon a time
Sample Output 2
nc pn tm
Palindrome - 3
You are given a string, write a program to find whether the string is palindrome or not.
The first line of input is a string.
The output should be
In the given example, the string
No lemon no melon is a palindrome as we are ignoring spaces. So, the output should be True.
Sample Input 1
No lemon no melon
Sample Output 1
True
Sample Input 2
Race Cars
Sample Output 2
False
Palindrome - 2
You are given a string, write a program to find whether the string is palindrome or not.
The first line of input is a string.
The output should be the string
In the given example, the string
Madam is a palindrome as we are treating M and m as equal. So, the output should be True.
Sample Input 1
Madam
Sample Output 1
True
Sample Input 2
Treat
Sample Output 2
False
Given a M x N matrix, write a program to print the matrix after ordering all the elements of the matrix in increasing order.For example, if the given M is 3 and N is 3, read the inputs in the next three lines if the numbers given in the next three lines are the following.
1 20 3
30 10 2
5 11 15
Given two strings(S1 and S2), write a program to determine if a string S2 is a rotation of another string S1.
For example, if the given strings S1 and S2 are "python" and "onpyth",
The first right rotation of s1 is "npytho" which is not equal to string S2"onpyth"
The second right rotation of s2 is "onpyth" which is equal to string S2 "onpyth".
So the output should be 2
What would the following display?
a = 5
b = 2
c = 3
result = a + b * c
Given two strings(S1 and S2), write a program to determine if a string S2 is a rotation of another string S1.