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
Mandarinka [93]
3 years ago
14

Write a function called reverse Return that is almost the same job as reverse, but instead of printing the letters straight to t

he screen, it returns a String in which the letters have been reversed. The function call would look like:
Computers and Technology
1 answer:
vekshin13 years ago
8 0

Answer:

The function in Python is as follows:

def reverse(inputstr):  

   outputstr = ""

   for i in inputstr:

       outputstr = i + outputstr

   return outputstr

Explanation:

This defines the function

def reverse(inputstr):

This initializes the output string

   outputstr = ""

This iterates through the input string

   for i in inputstr:

This generates the output string by reversing the input string

       outputstr = i + outputstr

This returns the reversed string

   return outputstr

You might be interested in
During Iteration planning, the PO introduces multiple new stories to the team. After a lot of discussion, the team decides to in
netineya [11]

Answer:

The answer is "Option d".

Explanation:

The Iteration Management is also an activity in which all members of the team will determine how many the backlog team will allocate towards the next Iteration, and each team wraps up the work only as a group of determined iteration targets. in the given question the "choice d" is correct because The plans to achieve without training entered PO or design staff and requirements have not even been identified, and the wrong choice can be defined as follows:

  • In choice A, T' he PO doesn't give the story detail, that's why it's incorrect.    
  • In choice B,  the doesn't a team left the past for more refining with the PO in the Project Backlog, that's why it's incorrect.  
  • In choice C, The Development Team has not found some other team dependency, that's why it's incorrect.

4 0
3 years ago
What determines the speed st which your computer perfoms tasks?
tamaranim1 [39]

The central processing unit (CPU) is what powers the computer. Any lower-end CPUs will not run a quick-functioning computer very well.

3 0
4 years ago
PLEASE ANSWER ASAP!!!!
kondaur [170]

Answer:

na bro, esta dificil

Explanation:

3 0
3 years ago
we are given an array a consisting of n distinct integers. we would like to sort array A into ascending order using a simple alg
marta [7]

Answer:

Check the explanation

Explanation:

the js code is as follows

function count_max_group(ar) {

if (ar.length < 2) return ar.length; // if no of elements are 2 then max groups are 2

let st = [0]; // stack to store the groups

for (let i = 1; i < ar.length; i++) {

if (ar[i] >= ar[i - 1]) st.push(i); // pushing elements if if ar[i] is greater than the previous element

for (let j = i; j > 0 && ar[j] < ar[j - 1]; j--) { // finding the max number of grps

swap(ar, j, j - 1); // swapping

if (j <= st[st.length - 1]) st.pop();

}

}

return st.length;

}

function swap(a, i, j) { // function to swap two variables

let t = a[i];

a[i] = a[j];

a[j] = t;

}

//sample solutions

console.log("the sample solutions are\n");

console.log("[2,1,6,4,3,7]\n");

console.log(count_max_group([2,1,6,4,3,7]));

console.log("[4,3,2,6,1]\n") ;

console.log(count_max_group([4,3,2,6,1]));

console.log("[2,4,1,6,5,9,7]\n");

console.log(count_max_group([2,4,1,6,5,9,7]));

4 0
4 years ago
Why can a v6 truck pull more than the v8
Alona [7]

no more power has more cylinders


3 0
3 years ago
Other questions:
  • Which action could be used to determine if a host is compromised and flooding traffic onto the network?
    6·1 answer
  • Chloe is building a kiosk-based Excel application. She wants to make some modifications to the screen elements in order to keep
    8·1 answer
  • Which component is the smallest unit in a spreadsheet?
    14·2 answers
  • Overloading in methods are popular in programming, and why overloading is important.
    6·1 answer
  • Who was the founder of the location-sharing site Whrrl
    6·1 answer
  • List some of the ways that healthcare information technology is making healthcare more of a self-service industry?
    11·1 answer
  • 2. What is data redundancy?
    14·1 answer
  • You are tasked with leading a project to build a custom software testing tool for client. You have been provided with a set of p
    7·1 answer
  • Which one is the right code
    10·1 answer
  • Match each code snippet to its appropriate markup language name
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!