Peer Instruction: Unit 1 Multiple Choice QuestionsΒΆ
- 3, 5
- Incorrect! The first print statement outputs whether the x value equals 3 or not. Remember, == checks for equality and = sets a variable to a value.
- True, 5
- Correct! The first print statment outputs whether the x value equals to 3 and the second statement prints out z, the sum of x and y.
- 3, false
- Incorrect! The first print statement outputs whether the x value equals 3 or not. Remember, == checks for equality and = sets a value to a variable. The second print statement outputs z, which is the sum of x and y.
- True, false
- Incorrect! Although it is true that the first print statement outputs whether the x value equals 3 or not, the second statement prints out z, the sum of x and y.
- None of the above
- Incorrect! One of the answers above is true! Remember that == checks for equality and = sets a value to a variable.
16-6-1: What is the output of this code?
int x = 3;
int y = 2;
System.out.println(x == 3);
int z = x + y;
System.out.println(z);
- Deep Red
- Incorrect! 11111111 means 255 in binary, not deep red. Red is (255, 0, 0) in RGB so 11111111 00000000 00000000 represents red in binary.
- White
- Incorrect! 11111111 means 255 in binary, not white. White is typically interpreted as 1 in bits. Since white is (255, 255, 255) in RGB, it would be 11111111 11111111 11111111 in binary.
- Black
- Incorrect! 11111111 means 255 in binary, not black. Black is typically interpreted as 0 in bits. Since black is (0, 0, 0) in RGB, it would be 00000000 00000000 00000000 in binary.
- 1
- Incorrect! 11111111 means 255 in binary. 1 in binary is 1.
- 255
- Correct! 11111111 means 255 in binary.
16-6-2: What does this data stored in a computer represent (in binary)?
11111111
- Red - foo, Green - foo
- Incorrect! In this situation, the red box is replaced by foo, which places the space image in the background. The green box is replaced by bar, which places the image of the girl in the center, at the forefront of the image.
- Red - bar, Green - bar
- Incorrect! In this situation, the red box is replaced by foo, which places the space image in the background. The green box is replaced by bar, which places the image of the girl in the center, at the forefront of the image.
- Red - foo, Green - bar
- Correct! In this situation, the red box is replaced by foo, which places the space image in the background. The green box is replaced by bar, which places the image of the girl in the center, at the forefront of the image.
- Red - bar, Green - foo
- Incorrect! In this situation, the red box is replaced by foo, which places the space image in the background. The green box is replaced by bar, which places the image of the girl in the center, at the forefront of the image.
- None of the above
- Incorrect! One of the answers above is correct. In this situation, the red box is replaced by foo, which places the space image in the background. The green box is replaced by bar, which places the image of the girl in the center, at the forefront of the image.
16-6-3: Chromakey is a technique in which a block of one color can be replaced by another. What goes in the result of the red box? What goes in the result of the green box?
- Depends on the coordinates of x and y (not the color)
- Incorrect! The colors in bar determine what part of the image you are in because bar contains the red block that is being replaced by another color.
- Depends on the colors at coordinate x, y in foo
- Incorrect! The colors in bar determine what part of the image you are in because bar contains the red block that is being replaced by another color.
- Depends on the colors at coordinate x, y in bar
- Correct! The colors in bar determine what part of the image you are in because bar contains the red block that is being replaced by another color.
- Depends on the colors at coordinates x, y in foo compared to those in bar
- Incorrect! The colors in bar determine what part of the image you are in because bar contains the red block that is being replaced by another color.
16-6-4: Chromakey is a technique in which a block of one color can be replaced by another. How will you know if you are in the red part of the image?
- Have shorter frequency and stronger compressions/rarefactions
- Incorrect! Frequency is not impacted by feeble or loud sound. A louder sound equates to a larger amplitude and stronger compressions/rarefactions.
- Have smaller amplitude and stronger compressions/rarefactions
- Incorrect! A feeble sounds has a smaller ampltitude. A louder sound equates to a larger amplitude and stronger compressions/rarefactions.
- Have higher frequency and stronger compressions/rarefactions
- Incorrect! Frequency is not impacted by feeble or loud sound. A louder sound equates to a larger amplitude and stronger compressions/rarefactions.
- Have larger amplitude and stronger compressions/rarefactions
- Correct! A louder sound equates to a larger amplitude and stronger compressions/rarefactions.
- None of the above
- Incorrect! One of the answers above are correct.
16-6-5: Soundwaves have varying frequencies, amplitudes, pitches, and compressions/rarefactions. If the following sound were modified to be louder it would
- A
- Correct! A higher pitch causes the frequency to increase.
- B
- Incorrect! A higher pitch causes the frequency to increase. It does not cause the amplitude to change.
- C
- Incorrect! A higher pitch causes the frequency to increase. It does not remain the same.
- D
- Incorrect! A higher pitch causes the frequency to increase. It does not alter the shape of the sound wave.
16-6-6: Soundwaves have varying frequencies, amplitudes, pitches, and compressions/rarefactions. If the following sound was modified to have a higher pitch it would look like which of the following options: