subject

Which string method counts the number of characters in a string?

a. the count() function
b. the index() function
c. the replace() function
d. the len() function

which of the following lines of code would slice all of the characters before index 6 and then stride through every other character in the slice?

a. string_var[: 6: 2]
b. string_var[6: : 1]
c. string_var[6: : 2]
d. string_var[: 6: 1]

what would you expect to happen in response to the code string_var[3: 5]?

a. a substring will be sliced from index 3 through index 4.
b. a substring will be sliced from index 0 through 5.
c. the substring will be sliced from index 3 through the end of the string, and then it will stride through the string.
d. a slice will be created using the characters before index 3 and then it will stride with the stride number 5.

which list method returns an element at a specific index and then deletes that element from the list?

a. the pop() function
b. the remove() function
c. the append() function
d. the replace() function

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
Ineed a good science fair name i’m doing a homemade water filter and i have no idea what the title should be plz
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 20:10
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
You know the right answer?
Which string method counts the number of characters in a string?

a. the count() functio...
Questions
question
Advanced Placement (AP), 13.11.2020 16:50
question
Mathematics, 13.11.2020 16:50
question
English, 13.11.2020 16:50
question
Mathematics, 13.11.2020 16:50