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 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
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
History, 31.07.2019 08:30
Questions on the website: 13722362