1. Total Sales Design a program that asks the user to enter a store’s sales for
ID: 3855583 • Letter: 1
Question
1.
Total Sales
Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result.
Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code.
2.
Lottery Number Generator
Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element. (Use the random function that was discussed in Chapter 6.) Then write another loop that displays the contents of the array.
Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code.
Explanation / Answer
NOTE: Since python code works only if indentation is properly done, i have uploaded code for both the programs in below links where indentation is maintained. Please check and let me know if you face any issues. I will revert back within 24 hours.
Program.1:
Code:
http://pasted.co/3e197d59
output screenshot:
https://pasteboard.co/GAmVFfJ.png
Program.2:
Code:
http://pasted.co/e898d0d9
output screenshot:
https://pasteboard.co/GAmVR5s.png
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.