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
Nutka1998 [239]
3 years ago
11

DRAG DROP -A manager calls upon a tester to assist with diagnosing an issue within the following Python script:#!/usr/bin/python

s = "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:
Computers and Technology
1 answer:
salantis [7]3 years ago
8 0

Answer:

The output is to the given question is:

nist

nsrt

imdA

strat

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.

You might be interested in
What is the system of computers, routers, wires, cables,etc. that allow computers to communicate called?
Anika [276]
Internet maybe?
Not 100% sure though
5 0
3 years ago
A student sits down at a computer and presses the power button. the computer does not turn on. what is a logical explanation as
ASHA 777 [7]
Since the computer is not working, it is best for the student to test methods that will ensure that there may be complications as to why it is not turning on and why it still off. The most basic step in determining the reason is whether the computer's plug is plugged in the outlet and the student should ensure whether it is plug or unplug.
4 0
3 years ago
Which of the following statements about personality tests are true? Check all of the boxes that apply.
borishaifa [10]

Answer:

They evaluate a person’s personality traits And They can be used as self-assessment tools for career planning. are the answers.

4 0
4 years ago
What is a drone satellite?​
babymother [125]

Answer:

A satellite that can be controlled where to go.

Explanation:

4 0
3 years ago
Write a C++ program that searches for anagrams in a dictionary. An anagram is a word obtained by scrambling the letters of some
Semmy [17]

Answer:

d, avt, car, feet, more, pitch, rome, tac, teef,

Anagrams of b in dictionary

Anagrams of cat in dictionary

avt, cat, tac,

Anagrams of room in dictionary

more, rome,

Anagrams of hello in dictionary

Anagrams of  in dictionary

Explanation:

// FindAnagrams.cpp : it is the starting point of application console.

//

#include <vector>

#include <hash_map>

#include <iostream>

#include <string>

#include <algorithm>

#include <map>

#include <set>

using namespace std;

using namespace stdext;

bool IsAnagrams(string& strA, string& strB)

{

   list<char> listA(strA.begin(), strA.end());

   list<char> listB(strB.begin(), strB.end());

   listA.sort();

   listB.sort();

   return listA == listB;

   // return equal(listA.begin(), listA.end(), listB.begin());

}

string SortChars(string str)

{

   list<char> l(str.begin(), str.end());

   l.sort();

   return string(l.begin(), l.end());

}

set<string> FindAnagrams(list<string>& dict, string findStr)

{

   map<string, set<string>> d;

   typedef pair<string, set<string>> MyPair;

   for(list<string>::const_iterator it = dict.begin(); it != dict.end(); ++it){

       string str(SortChars(*it));

       if(d.find(str) == d.end()){

           set<string> s;

           s.insert(*it);

           d.insert(MyPair(str, s));

       }

       else{

           d[str].insert(*it);

       }

   }

   string sortedStr(SortChars(findStr));

   return d[sortedStr];

}

int main(int argc, char* argv[])

{

   list<string> dict;

   dict.push_back("c");

   dict.push_back("car");

   dict.push_back("avt");

   dict.push_back("taac");

   dict.push_back("feet");

   dict.push_back("teef");

   dict.push_back("rom");

   dict.push_back("more");

   dict.push_back("pit");

   dict.sort();

   cout << "The dictionary: " << endl;

   copy(dict.begin(), dict.end(), ostream_iterator<string>(cout, ", "));

   cout << endl;

   list<string> testCases;

   testCases.push_back("d");

   testCases.push_back("car");

   testCases.push_back("rome");

   testCases.push_back("hell");

   testCases.push_back("");

   for(list<string>::iterator it = testCases.begin(); it != testCases.end(); ++it)

   {

       cout << endl << "Anagrams of " << *it << " in dictionary" << endl;

       set<string> output = FindAnagrams(dict, *it);

       copy(output.begin(), output.end(), ostream_iterator<string>(cout, ", "));

       cout << endl;

   }

   return 0;

}

8 0
3 years ago
Other questions:
  • HELP PLZ WILL MARK BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!! :)
    14·2 answers
  • To what extent do you think st. cyprian was effective in his efforts to bring inherited christian teachings to bear on the unpre
    10·1 answer
  • A ________ editor was the dominant way film was edited up until the early '90s.
    7·2 answers
  • One of the main purposes of special effects is to accomplish shots that would be too expensive, too dangerous or just plain impo
    9·2 answers
  • Which of the following statements is true with regards to satellite Internet access?
    13·2 answers
  • When shading paragraphs, Word shades from the left margin to the right margin of the current paragraph. True or false?
    5·1 answer
  • Which of the following is not a valid SQL command? (Points : 2) UPDATE acctmanager SET amedate = SYSDATE WHERE amid = 'J500';
    11·1 answer
  • Questions Presscomion
    9·1 answer
  • How many times is the second for loop going to loop in this block of code? Write your answer in numeric form in the box provided
    6·1 answer
  • Beth is a software developer who is focused on identifying early-stage interface problems. Beth addresses the dimension of usabi
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!