Question: Use python Function 1: The main function For the main function of this lab, you have only to call the function CreateInterface defined below. Function
Use python
Function 1: The main function For the main function of this lab, you have only to call the function CreateInterface defined below.
Function 1: Create a window Write a function called CreateWindow that takes no parameters and it returns one varaible. Inisde the function create a graphical window with the title lab 7 and width 600 and heigt 600. Then set the background color of the window to white. After that show a text "Welcome to Lab 7" centered at point (300,15). Make the text with size 16 and it is with red color. Then draw a line between the points (10,20) and (590,20) with a blue color. Finally returns the window created inside the function.
Function 2: Closing the window Write a function called CloseWindow that recieves one parameter and it returns nothing. The function recieves one parameter which is the name of a graphical window. The function let the user clicks a mouse on the screen then it closes the window.
Function 3: Create an Interface Write a function called CreateInterface that recieves no parameters and it returns nothing. The function first call the function CreateWindow and store the returned value of that function. After that show the interface described below. At the end of this function call the function CloseWindow. The CreateInterface function has to show the following interface:

After you create this interface with the proper shapes (Texts, Entries, Rectnagles, Ovals, and Lines, write a code for the following actions:
Let the user fill data inside all the entries.
Let the user click the mouse only one time.
Call the following functions in a row. Store the results back into proper variables then show each result through a Text that is located inside the white Oval of every problem.
The functions that you need to call are the following.. CalculatingCommission ShippingCost SoundSpeed
Function 4: Calculating Commission A large company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9% of their gross sales for that week if s/he sells more than 1000 a week, otherwise they get only $100 per week plus 10% of their groos sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Write a function called CalculatingCommission that recieves one parameter which is the salesman weekly sale and then it calculates and returns the amount of the commission.
Function 5: Heating Time Recommendation A microwave oven manufacturer recommends that when heating two items, add 50% to the heating time, and when heating three items double the heating time. Heating more than three items at once is not recommended. Write a function called HeatingTimeRecommendation that receives two parameters -the number of items and the single-item heating time.-, then function then calculates and returns the recommended heating time.
Function 6: Calculating Shipping Cost A shipping company uses the following function to calculate the cost (in dollars) of shipping based on the weight of the package (in pounds). Write a function called ShippingCost that receives one integer parameter called ItemWeight and it returns the cost of shipping for that parameter.
Function 7: Calculating Sound Speed The following table shows the approximate speed of sound in air, water, and steel.
| Medium | Speed |
|---|---|
| Air | 1,100 feet per second |
| Water | 4,900 feet per second. |
| Steel | 16,400 feet per second. |
Define a function called SoundSpeed that receives two parameters and it returns one value back. The parameters are as follows: The first one represents the medium and the secound one represents the distance a sound wave will travel in the selected medium. The function calculates the amount of time it will take for the sound to get through the chosen medium (round the answer to 3 decimal places). The function returns back the calcaulted value.
friday example Welcome to Lab 7 Problem#2 Items# Time Problem#1 Sales Problem#3 Problem#4 Weightedun Distance friday example Welcome to Lab 7 Problem#2 Items# Time Problem#1 Sales Problem#3 Problem#4 Weightedun DistanceStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
