1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bekas [8.4K]
3 years ago
11

If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not

Computers and Technology
1 answer:
notka56 [123]3 years ago
7 0

In Python, a string is an array of characters, we can access these characters using index operator []. For example, we have a_string = "Hello World" a_string[0] prints the first character in string ('H').

We can also use index operator to make substrings, for example a_string[0:3] will make a substring with first, second, third and fourth character equal to "Hell".

Now to business

my_string = "This is MY string!"

print(my_string[0:7]) # Prints "This is "

print(my_string[0:7:5]) # Prints "T" then prints the sixth character since we start counting at 0 hence prints "Ti" (note that space is also a character).

Hope this helps.

You might be interested in
In addition to benchmark testing, performance measurements, called _____, can monitor the number of transactions processed in a
Shalnov [3]

Answer:

metrics

Explanation:

Given that Metrics is Metrics is an accepted technique of measuring quantities of elements or commodities.

It is used in all facets of human activities particularly in value measurement such as production operation, financial assessment, comparison purposes, etc.

Hence, In addition to benchmark testing, performance measurements, called METRICS, can monitor the number of transactions processed in a given period, the number of records accessed, and the volume of online data.

3 0
2 years ago
Your older brother Max tells you about his secret plan to hack into his college’s computer network and change all of his grades.
viktelen [127]

Answer:

Tell him he could get kicked out of school and it can possibly show up on his record and lessen his chances of finding a job since no one will trust him. He should just focus and get his grades up instead of risking everything and "taking the easy way out".

Explanation:

6 0
2 years ago
The development methodology where each part of a project is done in order after each other is called:
Oksanka [162]

Bruh this a duplicate

8 0
3 years ago
How can you modify elements of the Start menu?
netineya [11]

Answer: you can add program by using a "pin" option or

For frequently used program you can customize the list by including or exuding program

But those on right are coming with Windows features

4 0
3 years ago
Briefly describe the software quality dilemma in your own words
Dahasolnce [82]

Answer:

 software quality dilemma is a situation where there is confusion regarding what should we prioritize : a good quality work or a fast paced work. In software development , many a times there will be deadlines to achieve, in such cases software quality dilemma is bound to occur. A developer would have to choose between writing and optimized and well commented code or just get the job done without proper optimized or reviews. In same lines, many companies have to decide between regular reviews and expert opinions of a product for good software quality or bypass them to meet budgets and deadlines.

6 0
3 years ago
Other questions:
  • Think about a time when someone made a biased judgment about you or acted unfairly toward you because of your age, skin color, c
    6·1 answer
  • What happens when the computer is thrashing? quizzlet?
    12·1 answer
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • When replacing a thermostat or water pump, coolant drained from the cooling system should be ________.
    9·1 answer
  • Demographics refers to
    7·1 answer
  • An address has a house number, a street, an optional apartment number, a city, a state and a postal code. Define the constructor
    5·1 answer
  • Lee has changed the style of his table to make the header row stand out. Next, he wants to center the text in the header row and
    11·2 answers
  • A computer _________________ is a text file that a computer can understand
    12·1 answer
  • Is Flip book drawings, frame by frame (need great drawing skills).
    11·1 answer
  • which of the following commands can be used to display any email messages awaiting delivery alongside the reason that they were
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!