Use the following problem to provide an explanation of how you will use this problem to teach learners the steps of problem solving in Information Technology. Your answer must include the complete solution (algorithm) of the problem, but the computer code is not necessary. A company determines its employees’ weekly salaries by using the number of hours the employee worked during the week and rate per hour. If the employee worked more than 45 hours, he/she is paid at double his/her hourly rate for each hour in excess of 45 hours. The employee’s identity number, the number of hours worked per week by the employee and rate per hour are captured. The desired output is a salary slip that will indicate all details of the employee as well as the salary earned by the employee once 25% has been deducted for income tax purposes.
Write a program that asks the user for an integer and then prints out all its prime factors. For example, when the user enters 84, the program should print
2
2
3
7
Validate the input to make sure that it is not a character or a string or a negative number using a do loop.
Radioactive decay of radioactive materials can be modeled by the equation A = A0e −t(log2/h) where A is amount of material at time t, A0 is the material at time 0, and h is the half-life of the radio active material. Technetium-99m is a radioisotope that is used in imaging of the brain. It has a half-life of 6 hours. Your program should display the relative amount of A/A0 in a patient body every hour for 24 hours after receiving the a dose. Prompt user for the initial dose (A0) in millicuries (mci). Typical values range from 3.8 - 15 millicuries. However, you can use any value for this program. Even milligrams. Enter values without negative exponents. If you want to enter 15 milligrams, enter 15. Same, for millicuries. 1Display your results in a table, the first column showing hours beginning at 0, and ending at 24. The second column shows the ratio of A/A0 beginning at hour 0 when the ratio is 1. Make sure that only positive values are entered for the initial dose using a do/while loop.
The marks of student in 3 subjects for 3 examseach are stored in an array.The result needs to be calculated by first taking average score of three exams for each of the subject.Store the average result obtained in an array.If any of the three averages are less than 60,mention which subjects need a retake.
Create a program with nested list and displays this kind of output:
sample output:
[['Egg', 'Milk', 'Meat', ], ['Potato', 'Carrot', 'Turnip', ],['Apple', 'Orange', 'Grape', ]]
Milk
Turnip
Grape
Given an integer N, write a program to print the sandglass star pattern, similar to the pattern shown below.
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * * Input
The input will be a single line containing a positive integer (N).Output
The output should contain the asterisk(*) characters in the sandglass star pattern.
Note: There is a space after each asterisk(*) character.Explanation
For example, if the given number is 5, the pattern should contain 9 rows and 9 columns as shown below.
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * * Sample Input 1
5
Sample Output 1
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
Who will pay the bill?
In London restaurants, it is not uncommon for a group of diners to pay the bill via card. To make it more fun, each of them bring the card and the restaurant server will pick one randomly and will pay the bill.
As a programmer, recreate this event through a python program. It will accept names separated by comma and space (“, “). Make a list out of the entered names and pick one randomly that will pay the bill.
Sample output:
Enter names: carlo,fedrick,jhon,icy
carlo will pay the bill
HINT:
1. Use split function
2. Use random module
3. Use len function
Part 1
The volume of a sphere is 4/3πr3, where π has the value of "pi" given as 3.141592653589793. Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.
Call your print_volume function three times with different values for radius.
Include all of the following in your Learning Journal:
REQUIREMENTS
Submit your Python script file in the posting of your assignment. Your Python script should be either a .txt file or a .py file.
You must execute your script and paste the output produced into a document that you will submit along with your Python script.
It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your peer assessors. A placeholder can be output such as “Printing nine lines” or “Calling clearScreen()”.
The following items will be used in the grading rubric for this assignment. Make sure that you have addressed each item in your assignment.
Using the IDLE development environment, create a Python script named tryme4.py. (Note: an alternative to IDLE is to use a free account on the pythonanywhere website: https://www.pythonanywhere.com/)
IDLE has both an interactive mode and a script mode. You must use the script mode to develop your script. Your script must use meaningful variable names and have comments that describe what is happening in your script. Comments may describe the assignment of a value to a variable, a computation and the assignment of the result to a variable, or the display of the result.
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
TO BE CONTINUE...