subject

1.The method adds a new element onto the end of the array. A. add
B. input
C. append
D. len
2.A(n) is a variable that holds many pieces of data at the same time.
A. index
B. length
C. array
D. element
3.A(n) is a piece of data stored in an array.
A. element
B. length
C. array
D. index
4.Where does append add a new element?
A. To the end of an array.
B. To the beginning of an array.
C. To the middle of an array.
D. In alphabetical/numerical order.
5.Consider the following code that works on an array of integers:

for i in range(len(values)):
if (values[i] < 0):
values[i] = values [i] * -1
What does it do?

A. Changes all positives numbers to negatives.
B. Nothing, values in arrays must be positive.
C. Changes all negative numbers to positives.
D. Subtracts one from every value in the array.
6.Which of the following is NOT a reason to use arrays?
A. To quickly process large amounts of data.
B. Organize information.
C. To store data in programs.
D. To do number calculations.
7.Consider the following:

stuff = ["dog", "cat", "frog", "zebra", "bat", "pig", "mongoose"]
"frog" is .

A. an index
B. an element
C. a list
D. a sum
8. is storing a specific value in the array.

A. Indexing
B. Summing
C. Assigning
D. Iterating
9.Consider the following code:

stuff = ["dog", "cat", "frog", "zebra", "bat", "pig", "mongoose"]

print(stuff[3])
What is output?

A. zebra
B. bat
C. frog
D.['dog', 'cat', 'frog', 'zebra', 'bat', 'pig', 'mongoose']
10.Consider the following code:

tests = [78, 86, 83, 89, 92, 91, 94, 67, 72, 95]

sum = 0
for i in range():
sum = sum + tests[i]

print("Class average: " + str((sum/)))
What should go in the to make sure that the code correctly finds the average of the test scores?

A. sum
B. val(tests)
C. len(tests)
D. len(tests) - 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
question
Computers and Technology, 25.06.2019 10:30
Select all that apply. select all functions of an operating system. displays a gui. allows you to multitask. allows you to use the software that you want to use. allows you to edit images. coordinates the interaction of hardware and software. defrags the hard drive. allocates the computer's resources. saves data. retrieves files. keeps confidential documents secure. copies information from one document to another.
Answers: 1
You know the right answer?
1.The method adds a new element onto the end of the array. A. add
B. input
C. append
Questions
question
Mathematics, 05.11.2020 23:40
question
Mathematics, 05.11.2020 23:40
question
Biology, 05.11.2020 23:40
Questions on the website: 13722367