![]() ![]() If the program generated random numbers, it would be much more complex to create problems that would result in integer answers.Ĭapture and paste two program code segments you developed during the administration of this task that contain a student-developed procedure that implements an algorithm used in your program and a call to that procedure. Without list, the program would have to use individual variables and written sequentially instead of with a loop.Īdditionally, by storing the specific values for the problem it allows for the program to create division problems that result in integer answers. This also allows the program to expand easily by setting the loop length to the length of the lists. First, by using the lists instead of individual variables, the list can store all the values in one variable and use a loop to create the problem. ![]() The lists manages complexity in two different ways. first_number stores the first number in the problem and second_number stores the second number, which is the divisor for division problems. Each list stores the values that are used in the math problems. The program uses two lists, first_number and second_number. Second code segment: print(first_number, end = " "),Ĭorrect = first_number * second_numberĬorrect = first_number / second_number Explains how the selected list manages complexity in your program code by explaining why your program code could not be written, or how it would be written differently, if you did not use the listįirst code segment: first_number = Describes what the data contained in the list represent in your program Identifies the name of the list being used in this response Then, provide a written response that does all three of the following: The second program code segment must show the data in the same list being used, such as creating new data from the existing data or accessing multiple elements in the list, as part of fulfilling the program’s purpose. The first program code segment must show how data have been stored in the list. Capture and paste two program code segments you developed during the administration of this task that contain a list (or other collection type) being used to manage complexity in your program. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |