DO NOT upload assignment files in a zipped folder!Zipped folders WILL NOT be opened and will receive a grade of '0****BEFORE YOU BEGIN:This...






















DO NOT upload assignment files in a zipped folder!Zipped folders WILL NOT be opened and will receive a grade of '0




















****BEFORE YOU BEGIN:





This assignmentrequires using the IDLE Editorto code, save and test programs - be sure to read and study the information found in Appendix B, page 803-810 in the textbookBEFOREyou begin this assignment











Open the PDF below for assignment specs.I suggest that you print the PDF and check off each step as you complete it so that you don't miss anything.





These specs must be followed to earn all points for this assignment.


















Be precise with file names using the filenames found in the assignment specs. Pay attention to formatting and variable naming and follow CS101 Coding Standards.














It's a good idea to refer to the handout, "CS101 Coding Standards" found in WEEK 1. My suggestion is that you print this PDF and keep it near for reference when writing code in CS101.








Be sure to upload the .docx and the .py files to receive all points for this assignment. If either the .docx or the .py files are missing, the assignment will receive a grade with a minimum 50% grade reduction.

















Chapter4AProgEx.pdf











Download Chapter4AProgEx.pdf












































PROGRAMMING EXERCISE: Chapter 4A – from sections 4.1 – 4.2 (Condition Controlled Loops) This assignment assumes that you have read and studied Chapter 4, sections 4.1 – 4.2 in the class textbook and completed all example exercises. It is also assumed that you have viewed and studied all CLASS MATERIALS items found in this week’s module. A basketball coach wants to determine the average height of the players that are on the team each year and has asked you to write a program that can be used each season. Since this program will be used at the beginning of each season and the number of players on the team will vary each season, the exact number of players remains unknown. With this information, you determine that a loop should be used to input and calculate this information and that a condition-controlled loop is the best choice since the number of players changes yearly. You will write a program where the number of players is input and then uses the condition- controlled loop structure to input each player’s height, calculate a running height total, and a running count of number of heights input. When all player’s heights have been totaled, the program will then calculate the average height and output the average player’s height on the current team. The algorithm for this program is: 1. Get each player’s height 2. Keep a running total of heights and number of heights entered 3. Display the average team height 1. For Programming Exercise: a. Open template.py (located in your CS101 Assignment folder) and Save As teamjsmith.py (change jsmith to your first name initial and last name) b. Modify comment lines 1 – 4 with your information and a descriptive program purpose c. Beginning in line 6, write code to produce the output below. Be sure to follow CS101 Coding Standards. d. Use variables to store data that is input by the program user and read from the keyboard. e. Construct the variable names using the underscore name separator method (snake case). (pay_rate total_pay days_in_month pet_name) f. Use comments to identify the program code blocks • Program introduction • Variable declaration and initialization • Input and process • Output FYI – the textbook often overuses comments to better explain what each line or small section of code does for better student understanding and learning. When you write code, use in-line and small-block comments sparingly and only when absolutely needed. g. There are no constants in this program h. Save and Run the program. (Use the following as your test data.) Your output should look like the image below. Be sure to test your program with the same values. i. Use the TEST DATA displayed below. Your output displayed in the Python IDLE Shell when the program is run with the TEST DATA should be: a. Correct any coding errors and test and Save until output is correct and is exactly the same as above 2. Open the assignmentTemplate.docx 3. Save As PEC4A_FirstinitialLastname.docx (example PEC4A_JSmith.docx) into your CS101 Assignments folder 4. Add your first and last name to the top, in the first line of this Word document 5. Do a screenshot of your code and output (be sure both the Editor window and IDLE Shell are completely visible in your screenshot – cover your entire window – no background showing). The screenshot must also include the date and time displayed in the bottom right corner of your computer screen. 6. Paste your screenshot directly under your name that you just entered in the PEC4A_FirstinitialLastname.docx document in Step 4. 7. Save the PEC4A_FirstinitialLastname.docx and upload to this assignment drop area for grading 8. You will also upload one .py file: • teamjsmith.py There are 2 file uploads total for this assignment!! FYI - Pay close attention to the details found in this assignment spec to earn all possible points. Also, remember to replace “jsmith” with your firstinitiallastname. This is so that I always know whose assignment I’m grading!! Line numbers must be displayed in Editor window to earn all assignment points!! ****The assignmentTemplate.docx allows you to paste a full-size screenshot, so DO NOT resize screenshot to be smaller!! This assignment should be your own work. Using code other than what you have developed and constructed in this assignment is considered an Academic Integrity Violation, with a resulting grade of ‘0’ for the assignment!!!!
Mar 08, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here