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
Schach [20]
3 years ago
15

Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette

rs between the first letter and last letter. The input phrase could be a character vector of any length.
Computers and Technology
1 answer:
ad-work [718]3 years ago
4 0

Answer:

# The function reverseLetter is defined

def reverseLetter(received_word):

   # The first letter of the word is assigned to a variable using index 0

   firstLetter = received_word[0]

   # The last letter of the word is assigned to a variable using index of

   # string length - 1

   lastLetter = received_word[len(received_word) - 1]

   # reverse letters in between first and last letter is defined as

  # empty string

   reverseBetween = ""

   # A counter is defined to control the loop during the reversal

   # counter value is 2 from the length of the received string

   # The 2 is for the first and last letter remove

   counter = len(received_word) - 2

   # The while loop start

   while counter >= 1:

       # The reverseBetween string is concatenated with corresponding

      # index of received word

       # The index is from high to low since the process is string reversal

       reverseBetween += received_word[counter]

       # The value of counter is decremented

       counter -= 1

   # The reversed string is displayed with no separator

   print(firstLetter, reverseBetween, lastLetter, sep="")    

Explanation:

The code is well commented.

reverseLetter("come") will output cmoe

reverseLetter("welcome") will output wmoclee

reverseLetter("brainly") will output blniary

You might be interested in
Have you ever tried using such a camera?​
guapka [62]

Answer: yeah i mean i use my canon camera

Explanation:

7 0
2 years ago
What are new technologies, products, or services that eventually surpass the existing dominant technology or product in a market
kicyunya [14]

Answer:

Disruptive innovation

Explanation:

Disruptive innovation are considered those new technologies, products or services whose application can greatly impact the manner in which an industry or a market functions. This is because the surpass the existing dominant product or technology. One example of a disruptive innovation is the internet. The internet altered the manner in which business was done by companies, but negatively affected those who refused to adopt it.

4 0
3 years ago
What happens when you click on the colors button in excel?
borishaifa [10]
It writes in that color.
7 0
3 years ago
When first defining the cloud, NIST gave three service models, which can be viewed as nested service alternatives: software as a
irakobra [83]

Answer:

Infrastructure.

Explanation:

In Computer science, Cloud computing can be defined as a type of computing that requires shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives. It offers individuals and businesses a fast, effective and efficient way of providing services.

Simply stated, Cloud computing are services or programs located on the Internet, they are usually remote resources making use of cloud storage.

When first defining the cloud, National Institute of Standards and Technology (NIST) gave three (3) service models, which can be viewed as nested service alternatives;

1. Software as a Service (SaaS).

2. Platform as a Service (PaaS)

3. Infrastructure as a Service (IaaS).

According to NIST, the five (5) characteristics of a cloud computing service are;

1. On-demand self-service .

2. Broad network access .

3. Resource pooling .

4. Rapid elasticity .

5. Measured service.

Additionally, the cloud service can either be deployed as private, public, hybrid or community service.

6 0
3 years ago
_____ consists of computer equipment used to perform input, processing, and output activities.
goldfiish [28.3K]
<span> (keyboards, mice, scanning, computer chips)</span>
6 0
2 years ago
Other questions:
  • Tom's using Google Ads to promote his bicycle store. He's created an Android App and needs to measure how effectively the curren
    14·1 answer
  • Using a pin or password in addition to tpm is an example of what type of authentication?
    13·1 answer
  • A(n) ________ signal is a discrete, binary waveform that transmits data coded into two discrete states such as 1-bits and 0-bits
    12·1 answer
  • The length of a pencil would most likely be measured in:
    9·2 answers
  • Public places where you can wirelessly connect to the internet are known as wifi ________.
    11·1 answer
  • Who were called “freedmen” during the reconstruction period?
    15·2 answers
  • All organizations with a router at the boundary between the organization’s internal networks and the external service provider w
    11·1 answer
  • What name is given to the method used to copy a file onto a CD
    11·1 answer
  • When is not appropriate to be funny in a headline
    7·1 answer
  • Write a factorial method that takes in an integer as input, recursively computes its factorial using BigInteger and return a Big
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!