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
hodyreva [135]
3 years ago
13

Write a function called rotateRight that takes a String as its first argument and a positive int as its second argument and rota

tes the String right by the given number of characters. Any characters that get moved off the right side of the string should wrap around to the left.
Computers and Technology
1 answer:
elena-s [515]3 years ago
3 0

Answer:

The function in Python is as follows:

def rotateRight(strng, d):

   lent = len(strng)

   retString = strng[lent - d : ] + strng[0 : lent - d]

   return retString

Explanation:

This defines the function

def rotateRight(strng, d):

This calculates the length of the string

   lent = len(strng)

This calculates the return string

   retString = strng[lent - d : ] + strng[0 : lent - d]

This returns the return string

   return retString

Addition:

The return string is calculated as thus:

This string is split from the <em>index passed to the function to the last element of the string, i.e. from dth to last.</em>

<em>The split string is then concatenated to the beginning of the remaining string</em>

You might be interested in
In this unit, you developed your skills at coding in Python. In this lab, you will put those skills to work by creating a progra
Arturiano [62]

Answer:

Don't forget to close any parentheses you open. Other then that everything looks fine, I just polished it a little bit

Explanation:

name = input("What is your first name? ")

print("Hello", name)

age = int(input("How old are you? "))

print("In 10 years you will be", (age+10))

print("In 20 years you will be", (age+20))

print("5 years ago you were", (age-5))

5 0
3 years ago
Read 2 more answers
A device that filters data traffic at a network boundary​
Semmy [17]

Answer:

Bridges

Explanation:

A bridge is a transition effects that separates network traffic at the network's edge. By splitting a local area network into two parts, bridges minimise the number of bandwidth.

6 0
3 years ago
You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
Sav [38]

project management... we use this software to plan and schedule event and resources.

3 0
3 years ago
Read 2 more answers
Preciso de ajudar para resolver esse exercício, é para amanhã cedo!!<br><br> Em Dev C++
LenKa [72]
Bbbbbbbbbbbbbbbbbbbbbb
3 0
3 years ago
Read 2 more answers
Identify 5 internal and external hardware components of a server
UNO [17]

Answer:

Internal:

#CPU; That retrieves &execute instructions.

#Modem; Modulates& demodulates electric signals.

#RAM;Gives application a place to store &access data on a short time periods.

External:

#Mouse; Transmits commands and controlling movements.

#Moniter; Device used to display video output from computer.

#Printer; Accepts text, graphics to the paper.

Explanation:

Hope this will help you.

5 0
3 years ago
Other questions:
  • A smart refrigerator can use _____ to detect when you are running low on milk, and then send a reminder to you on a wireless net
    14·1 answer
  • The ____________ mechanism consists of a lever arm attached to the mousetrap spring.
    15·1 answer
  • MIDI is a A.technology based on placing brief digital recordings of live sounds under the control of a synthesizer keyboard. B.t
    10·1 answer
  • doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th
    9·1 answer
  • When an item in a menu is black, it means that _____.
    6·2 answers
  • What are the characteristics of good blogs?
    8·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • A major public university graduates approximately 10,000 students per year, and its development office has decided to build a We
    10·1 answer
  • Describe the main roles of the communication layer, the network-wide state-management layer, and the network-control application
    15·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!