![]() |
Home | Test Prep | Data Structures | Create Task |
goal: to create page that allows students to find GPA for the trimester
Requirements: one list, an input, an algorithm, one procedure, instructions for output, and calls to your student-developed procedure.
Brainstorm
Overview of the CB “Create Performance Task”
Create Task Code
1. PROGRAM CODE
□ Instructions for input from one of the following:
“Enter your grade in the form of a letter grade for each class:”
User will enter letter grades for each class
□ Use of at least one list (or other collection type) to represent a collection of data that is stored and used to manage program complexity and help fulfill the program’s purpose
Uses inputs provided by user to then store them as lower case only. This allows the function to work weather the input is put in uppercase or lowercase.
□ At least one procedure that contributes to the program’s intended purpose, where you have defined:
Using the list as a parameter the grade calculator will act as a procedure and return the value of the GPA after being calculated.
□ An algorithm that includes sequencing, selection, and iteration that is in the body of the selected procedure
Sequencing: First the algorithm checks if what was inputted was an a, if it would that would be stored as a 4 if not then it would move to the next variable that could be inputted.
Selection: The code is only run if the user inputs their grades, also the grades are within the correct grading system.
Iteration: Continues to run through the function for each input repeating steps.
□ Calls to your student-developed procedure
Calculate GPA button calls to the function
□ Instructions for output (tactile, audible, visual, or textual) based on input and program functionality
2. VIDEO: Create Task runtime
https://user-images.githubusercontent.com/89223526/155920572-8e050eb1-896e-4da6-9df7-2a973132640f.mov
3. Written Response
a) The overall purpose of the program is for students to be able to calculate their GPA for the trimester. It allows students to be able to see how their grade reflects on their GPA. GPA is the grade point average of a student’s grades they get. Making a easy way for students to find theres will help them in the future. The video, it shows a user inputting their grades. I had them all lower case but the function would still work if some were uppercase. After typing in a letter grade the function takes it in then releases an output. That output, as seen, is the GPA of the five classes. The inputs provided in the video is A, B, and C. Other inputs include D and F but it is not shown in the video. The output in the video was the GPA of the five grades imputed, 3.2. The output can be anywhere between zero and four.
b)
These two code segments are both lists that help to run the program. Each list stores the values that were inputted by the user but they are in different forms. The two lists work with each other to store the inputs. The second list takes the data provided by the input then changes the values to lowercase so that the data is coherent. The first list changes the input into a new variable. The two lists are gpaList2 and gpaList1. These lists contain data of the inputs given by the user. So the grade the user got in each class is stored in the list. This allows for the program to calculate the GPA. Without the lists the program’s code would be a lot more lines. Lists also help so there aren’t individual variables to work with. If I didn’t have this list I would have to add in more statements showing the lowercase letters and what they would equal. That would cause the program to go throught more steps going through each if statements. Another thing I would probably have to do for the code is make a function for each input. This would cause the code to be over 300 lines of code because I would have to put in a function with ten if statements. For the uppercase and lowercase letter grades. Theses lists allow for the code to be less complex. It creates a more organized way of storing the values.
c)