Program Bug

As a Computer Information Systems student, I have encountered some problems with my programs. For one particular program, I had to write computer code that would create six faces, using a combination of circles and rectangles (circles for the head, eyes, and mouth/rectangles for the hair). Instead of writing the code for each individual face six times, I had to use an array. An array stores numbers, or variables. Arrays make it so you only have to write the code that creates a face once.
One bug that came up in my program was a result of not creating space in between each face. So when I ran the program, it compiled but created 6 faces in one location, on top of each other. I fixed this problem by applying the following calculation: “GAP” amount + the index amount*2. I was able to fix this problem because from the very beginning, I wrote comments in my code describing what each section of code did.
-
gloria2fg likes this
-
valenzuelaki09 likes this
-
stephanie620 likes this
-
cedriccs270blog posted this