27.4k views
4 votes
DRAG DROP -A manager calls upon a tester to assist with diagnosing an issue within the following Python script:#!/usr/bin/pythons = "Administrator"The tester suspects it is an issue with string slicing and manipulation. Analyze the following code segment and drag and drop the correct output for each string manipulation to its corresponding code segment. Options may be used once or not at all.Select and Place:

User Choesang
by
3.9k points

1 Answer

1 vote

Answer:

The output is to the given question is:

nist

nsrt

imdA

strat

Step-by-step explanation:

The missing code can be defined as follows:

code:

s = "Administrator" #defining a variable that hold string value

print(s[4:8])#using slicing with the print method

print(s[4: 12:2])#using slicing with the print method

print(s[3::-1])#using slicing with the print method

print(s[-7:-2])#using slicing with the print method

In the above code, a string variable s is declared, that holds a string value, and use the multiple print method to print its slicing calculated value.

User Hasib
by
4.3k points