So I got some questions wrong, Oh well. SO in this notebook I have the correct answers for the questions I missed and why they’re correct

  • Question 1: I missed this one because I thought that setting the result to 2 and multiplying it by 5 three times would be 2 (5x3) instead of 2(5^3), it was a misinterpretation, and I’ll be more aware of how it should properly be formatted.

  • Question 4: I missed this one because I neglected to realize that geographic location was more important that Brandon and Cynthia’s contacts list, simply due to the fact that delivery drivers need to know where they’re going

  • Question 5: It’s not necessary to know the past visited restaraunts, only allergy accomodating restaraunts are necessary

  • Question 6: Missed this one because starting it at 1 with a increase of 2 would make an odd number, and I just misread the greater than max sign as less than

  • Question 9: The code already is subtracting penalties in line 3, so it would not be needed to do it twice, so it would be more optimal to set it to score is less than 0 to start

  • Question 11: The Loop makes different iterations from the first element one to the second to last element in the loop, and the inside loop compares each to every subsequent element instead of every other one

  • Question 13: If the code were to run with the numbers in the list as -1, 0, 1, it would not function because there are negative AND positive numbers in the list

  • Question 14: If the numCorrect is 7, it would be false, and working as it should, but if it were 6, it would follow under the same command and mark a check instead of check minus, and with 8, it would follow the same command and give a check instead of check plus

  • Question 15: Software users do need to have experience, so having them only providing feedback would be the only thing necessary instead of sole involvement

  • Question 17: Protocols used on the Internet enable devices from different manufacturers to communicate in a standard way but don’t always have the same bandwidth.

  • Question 18: The Internet is not a data stream, its an interconnected network of networks, and the World Wide Web is an information system that is accessed via the Internet.

  • Question 19: The Maximum binary value is 1111 at 15, so 29 wouldn’t be possible for 4 bit binary.

  • Question 21: Sound, color, and characters are all in binary as sequences of prints

  • Question 22: Binary 0011 is equivalent to 2^1+2^0, or decimal 3. Binary 0110 is equivalent to 2^2+2^1, or decimal 6. Binary 1111 is equivalent to 2^3+2^2+2^1+2^0, or decimal 15. Decimal 9 is not equivalent to any of the given binary numbers.

  • Question 23: While a runner’s position could be estimated using the runner’s average speed, a more accurate representation of the position over time can be achieved using a sampling technique.

  • Question 24: Binary 1011 is equivalent to 23+21+20, or decimal 11, and binary 1101 is equivalent to 23+22+20, or decimal 13. The order of the numbers (written in their equivalent decimal format) is 5, 11, 12, 13.

  • Question 28: If the number of units of electricity used is 25 or less, the cost is 5 times the number of units. Otherwise, the cost is 5 times the first 25 units plus 7 times the number of units above 25. For examples, if a customer used 32 units of electricity, they should be charged $5 for the first 25 and $7 for the additional 7 units (32 – 25 = 7 units), for a total charge of $174.

  • Question 29: input data can be stored in any fashion, not just lists, but lists specifically can hold as many data values necessary

  • Question 30: Rounding numbers in a list can make the program easier to make and apply algorithms, but it doesn’t make rounding numbers to nearest integer easier, it’ll be the same.

  • Question 32: The last assignment statement assigns a copy of myList to yourList. Since myList contains [10, 30, 50, 70], yourList will also contain [10, 30, 50, 70].

  • Question 34: The code executed would store all the data of the lists, but then it swaps the data in the lists with each other, until it’s just ‘guitar’,’drums’, ‘bass’

  • Question 35: One of the code segments used the if statement to set maxPS to 30 when time was greater than 120, and uses else to set to 50, but then another code segment sets maxPS to 50 by default, and uses IF to set maxPS to 30 when time is greater than 120

  • Question 37: there needs to be temporary values to change the vaules of variables, so num1 was sent to temp while num2 was set to num1, and then the temp was sent to num2.

  • Question 38:The first line changes word1 to the temp. The second statement changes the value of word3 to word1. The third statement assigns the original value of word1, which is stored in temp, to word3. The original values of word1 and word3 are interchanged, which reverses the values of the variables as intended.

  • Question 39: Values in ists are nonnegative integers, which rejects negatives, decimals, and words, so plain numbers are valid as a string value

  • Question 41: The first four statements assign values to the variables. The fifth statement assigns the value of q (which is 20) to p. The sixth statement assigns the value of r (which is 30) to q. The seventh statement assigns the value of q (which is 30) to s. The last statement assigns the value of p (which is 20) to r. Therefore, r has the value 20. After executing the code segment, the value of p is 20, the value of q is 30, the value of r is 20, and the value of s is 30.

  • Question 42: Going down the sequence, The num1 < num2 line would be set to false, which causes the body of else to execute, setting num3 to 4, which triggers num2 > num3 to be true, causing the body of the second IF to execute and num is made 8. FInally, it executes 8+4+4/16

  • Question 43: The variables x and result are initialized to 0. Inside the loop, result is increased by x and x is increased by 1. The loop terminates when x exceeds 5. Therefore, result is assigned the sum of the integers from 0 to 5, or 15.

  • Question 44: 23 diveded by 3 leaves a remainder of 2, so 23 mod 3 is 2

  • Question 46: The first two statements assign valuse to both variables, and the third assigns the value of the first value to second, and the 4th line assigns the value of second to first

  • Question 47: The first five statements assign values to the variables. The sixth statement assigns the value of x + b (which is 40) to b. The seventh statement assigns the value of x + 1 (which is 21) to a. The eighth statement assigns the value of c + d / 2 to d. According to the order of operations, division has higher precedence than addition. Since c is 30 and d / 2 is 20, d is assigned the value 50. The last four statements display the values of a, b, c, and d.

  • Question 48: The first 3 lines define the variables, and the 4th sets y (50) to x, 5th sets z (75) to y, and the 6th sets x (50) to z, so both x and z are (50)

  • Question 50: To correctly for initials in a statement, it needs calls to prefix to obtain the first letters of each name, and uses another call to compile the letters in the correct order.