week3_labB 1 Submission Requirements: • One Word document (the file name must be Lab3B.docx) containing the testing and outputs (i.e., screenshots) of the execution of your Python programs as the...

programs


week3_labB 1 Submission Requirements: • One Word document (the file name must be Lab3B.docx) containing the testing and outputs (i.e., screenshots) of the execution of your Python programs as the solutions for the following questions (items in this Word document must be in the same order as the questions). • Your Python programs (that is, the .py program files)—note that there are specific requirements on the program names. Note: o Your code must be properly commented (like the examples in Code Archive; you don’t have to comment on every line of code.) o On the top of your program, there must be 3~5 lines of the comments of your full name and date/time when you have completed the programs. • (Attach your program files individually; do not zip the programs; do not put the Python code in the Word document.) Q1 (40 points) Write a program “Lab3B01.py” that prompts the user to enter a number in the range 1 to 999.99 (inclusive) and validates the input by using while-loop. Loop until user enters: 555.55. Print the inputted number with 2 decimal places—see the following example. The screenshot of your program execution would look like the following: 2 Q2 (40 points) Write a program “Lab3B02.py”that creates a list of 5 integers (prompting for inputs and add to the list one by one), print the list. Then convert the list to a tuple (simply with use of the function tuple(..) ) and print the tuple in reversed order. You need to use while-loop. Use the following example for your implementation. The screenshots of your program executions would look like the following: 3 Q3 (60 points) Write a program “Lab3B03.py” that lets the user enter the total sales in dollars for each of a week into a list (use a loop for this task). The program should then calculate and display the total sales for the week, the average sales, and which days with the highest and lowest sales. Use a tuple or list to hold weekday names. Use a list to hold the sales per each week. The calculated sales output should be floating number with 2 decimal places. Use the following sample to guide your implementation. Also use while-loop to check the week sales input and for-loop to calculate the total. The screenshot of your program execution would look like the following:
Sep 19, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here