Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EXAMPLE PROGRAMS listed in Canvas Modules) 2: Enter your full name here Lab: Chapters 4 Description: This needs to be at least a paragraph explanation

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
EXAMPLE PROGRAMS listed in Canvas Modules) 2: Enter your full name here Lab: Chapters 4 Description: This needs to be at least a paragraph explanation of the program (in your own words) 6 7 BB CONSTANTS 9 PROGRAM_TITLE="Welcome to Letter Grade Counter Programin 10 GRADE_REPORT_TITLE="ingrade Count 11 LINE = 1 (PROGRAM_TITLE) 12 GRADE_LETTERS - (A, B,'c','','*') 13 14 MAIN PROGRAM DEFINITION BELOM 15 def (): 16 grade_book = 0) 17 grade_counter = [@] NLM GRADE_LETTERS print(PROGRAM_TITLE+LINE) 19 # HINT: Call functions (11_grade_book, count_letter_grades, & display_grade_report) below. - 20 21 22 23 DESCRIBE PURPOSE/LOGIC OF BELOW FUNCTION (in your own words) 24 def grade book(): 25 grade_book* () 26 nun students (import (HOW any students do you want to add to the gradebook? ) 27 HINT: using a for loop in the range length of num_students 28 # HINT: prompt for student's name 29 # HINT: prompt for student's grade and use upper function to capitalize it 30 + HINT: 4111 grade_book dictionary with the grade entered 31 HINT: return the filled grade_book dictionary 32 338 DESCRIBE PURPOSE/LOGIC OF BELOW FUNCTION (in your own words) 34 # HINT: define count_letter_grade function heading 35 # HINT: Initialize grade_counter list to like line 17 36 HINT: using for loop find student in grade_book 37 3 HINT: using for loop of 1 in range length of GRADE_LETTERS 38 # HINT: use if to check the student's grade in gradebook is equal to GRADE_LETTERS[1] 39 = HINT: update grade_counter by 1 40 return grade_counter 41 428 DESCRIBE PURPOSE/LOGIC OF BELOW FUNCTION (in your own words) 438 HINT: define display.erade report function heading 44 HINT: print PROGRAM TITLE with LINE above/below 45 # HINT: Use for loop 1 in range length of GRADE_LETTERS 46 # HINT: print GRADE_LETTERS[1] and grade_counter[1] with tab in between 47 48* MAIN FUNCTION CALL 49main() 4. After completing your program as instructed, make sure to Run your program file to obtain the output/result as required (refer to the screenshots in the table above in step 3b for various inputs entered and output displayed) 5. You may now proceed to Program Assignment INSTRUCTIONS and UPLOAD link within this module and follow the steps in the link or from steps below to submit your work as a Text Entry as well as File Upload (an attached.py file a. First, to submit your program as Text Entry, follow the steps below: Page 2 of 4 4. a. The first thing you should enter in your python program script file (CholastFirst.py file created in step 2) is a top comment block which includes the following Name: Enter your full name here Lab: Chapters 9 Description: This needs to be at least a paragraph explanation of the program (in your own words) FAQ page up nu loc ca R poge down 7 hor b. Below the top comment block, type the actual python code for the problem described in step 3. Make sure to include the functions as described below EXACTLYI/Refer to the sample code screenshot below with function call's and definition examples and HINTS): a. main() This main function should define the variables required and call the below functions (Refer to HINTS in tine #5 14 - 19 in the below sample program screenshot) b. fill_grade_book() This should be a value returning function called by main() function, that accepts no arguments. This function will accept from the user the number of students to add to the gradebook. Then, prompt for each student's name and letter grade and create a dictionary-based gradebook and returns the dictionary back to the main function (Refer to HINTS in line As 23 - 31 in the below sample program screenshot) c. count_letter_grades() This should be a value returning function called by main function, that accepts one dictionary argument. The program should then count the number of similar grade letters made by students and store them in a counter list for different letter grades and return the list back to the main function (Refer to HINTS in line # 33 - 40 in the below sample program screenshot) d. display_grade_report) This should be avoid function called by main function that accepts ane list argument that has the counts of similar grade letters and displays them as shown in the above output/results screenshots (Refer to HINTS in line #s 42 - 46 in the below sample program screenshot) Make sure to include the following in your program as well: I. Define appropriate/descriptive CONSTANTS/variable_names (Refer to line is 8-12, 16-17, etc in the below screenshot for examples I. Have enough documentation for understandablity of your program by including a comment block at the beginning of the program (Refer to lines 1 - 8 in the below screenshots and prior to each function describing in your own words the purpose of each function by explaining the logic of loop, if, and other python functions used (refer to Textbook/instructor EXAMPLE PROGRAMS lasted in Canvas Modules) HI Have proper Indentation and line spacing for readability of your program (refer to Textbook/Instructor 1 en 0 ind N BELOW NUM_GRADE_LETTERS LINE) ins (fill_grade_book, count_letter_grades, & OF BELOW FUNCTION (in your own words) nput("How many students do you want to add loop in the range length of num_students or student's name or student's grade and use upper function t de_book dictionary with the grade entered illed grade_book dictionary OF BELOW FUNCTION (in your own words) ter_grade function heading grade_counter list to like line #17 op find student in grade_book or loop of i in range length of GRADE_LETTEL if to check the student's grade in gradebo TUIT mund te Page 1 of 4 (CH9) Program Assignment Instructions Last Changed 1/1/2021 Read and follow the directions below carefully and perform the steps in the order listed. You will be solving one programu instructed and turning in your work electronically via an uploaded file within Eagle Online/Canvas and copy & paste the program to the Text Entry box as well. Make sure and check your work prior to uploading the assignment (Print this instruction sheet if needed) Instructions 1. Using Python IDLE, create a New Empty Script File in your working drive. Note: refer to (SET) How to Download Install and Use Python IDLE link (Page 8) within module 2 on how to create a scris file (NOTE: PLEASE MAKE SURE TO CREATE A SCRIPT FILE WITH PYTHON PROGRAM AND NOT RUN PROGRAM IN INTERACTIVE MODE AND SUMBITI 2. Save the file with the name CHSLastFirst.py, making sure to know where you saved it, where Last and First is your actual Lastname and Firstname (Reminder: You don't need to add the .py extension, IDLE will automatically add the extension) 3. You will develop a Letter Grade Counter Program as described below: a. In this modular program (using functions), you will create a dictionary-based gradebook with student's name ane letter grade as key-value pair. You will then count the number of similar grade letters (A, B, C, D, and F) Initialized in a list and display a report (as shown in the screenshots below). Firstly, you will accept from the user the number of students to add to the gradebook. You will then prompt for each student's name and letter grade and create a dictionary-based gradebook. The program should then count the number of similar grade letters made by students and display a report as shown in the screenshot below: (NOTE: Other than the data input, your output should look EXACTLY like in the below table showing a few sample runs for you to compare the items shown after the: and symbols are what you enter as input; those items can vary for each sample run). 1 2 ce Made

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

Develop goals and timetables.

Answered: 1 week ago

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago