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 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
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
Social Studies, 12.03.2021 01:00
question
Mathematics, 12.03.2021 01:00
question
Health, 12.03.2021 01:00
Questions on the website: 13722367