Font size
WorksheetsPLTW CSE Final Review Part -1
Total questions: 10
Worksheet time: 6mins
Which of the following is NOT an input device?
mouse
printer
scanner
microphone
What is input?
Displaying information on the screen.
Storing data in main memory
Putting information into the computer
Converting code to machine language
Which of the following about computers is NOT true?
Computing devices are electronic.
The CPU processes commands
The memory uses binary numbers.
Computing devices translate digital to analog information in order to process the information.
Which line of code outputs the decimal portion of a float stored in the variable x?
print (x / 1000)
print (x - int(x))
print (x)
print (x % 1000)
Which of the following numbers might this code generate: random.randint(1,9) ?
10
1
11
0
When do you use an else statement?
To tell what will happen when an if-statement is false
To end an IF statement
To handle string values
To Input a variable
When should you use an ELIF statement?
To repeat sections of code
To repeat sections of code
To count user actions
To get user input
Write the code to test if the word “BASIC” is stored in the variable text1
if (text1 == str("BASIC")):
if (text1 == "BASIC"):
if (int(text1) == BASIC):
if (text1 == BASIC):
Mark all the mistakes in the following code:
IF (name1 = "sue") :
“sue” should not have quotes
IF should be if
There should not be ( )
= should be ==
Information sent to a function is a?
Sum
Loop Control Variable
Range
Parameter
