BIM114 Programming Fundamentals
Develop a structure chart, write pseudocode, write program structure and finally write the program for the following problems.
- Powerball lottery has 8 numbers in a row. The first 7 numbers are randomly selected between 1 to 35. Once selected that number cannot be selected again. The last number is selected between 1 to 20 inclusive.
You must write a program that will ask the user how many rows they want as input and generates power ball rows as output.
- The body mass index (BMI) is calculated as a person’s weight (KG) divided by the square of the person’s height (in inches). A BMI in the range 19-25 (inclusive) is considered healthy. Write a program that calculates a person’s BMI and prints a message telling whether they are above, within, or below the healthy range. This program must keep on calculating BMI for the given input till user says, “they don’t want to continue”.
Hint: use a while loop and ask the user if they want to calculate BMI. If the answer is “Yes”, continue with calculations. If the answer is “No” quit the program.
Height = 1.78 m Weight = 102 KG Process:
BMI = 102 / (1.78*1.78) = 32.2 Output:
Your BMI is 32.19. You are obese. Lose weight to live longer.
- A company pays several its employees on an hourly basis. Weekly wages are calculated at $20 per hour for the first 30 hours in the week and then at $30 per hour. Once the total wage is calculated 30% is deducted for taxation purposes.
You must write a program that will read the number of hours worked. Calculate Normal wage, Overtime wage, and the total wage payable to the user. Also calculate the tax payable on total wage.
The program must print a payslip listing all wages and deductions. Several operators use this program, so you must write instructions about how to run the program. In future the company is thinking of storing all the information in text files, so you must write all the logic in functions so the code can be easily modified.
Screenshot below shows the working of the program;
- Write a program using TKInter widgets. When run the output window should look likeFigure 1 when the Red button is pressed it should look like Figure 2, when the Green button is pressed it should look like Figure 3, and when blue button is pressed looks like Figure 4.
Structure chart, pseudocode and program structure (using comments) for the programs must be written on a word document.
Working programs (.py) must have comments so that the marker can read and understand the code. Program execution instructions must be provided on the word document as well as the introduction function of each program.
Looking for corporate assignment help? Then MyAssignmenthelp.com is your one-stop answer. We render custom-made assistance with corporate as well as with IT assignment. We are available 24*7 to offer operating system, database, MATLAB, web development and lots of other IT subject based assignment help. We work round the clock to ensure 100% students satisfaction with our delivered service and to make sure that students get assistance on urgent basis.