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
dlinn [17]
3 years ago
11

Write function modifyString(origString, charsToReplace, count) that takes as input a string origString, a string charsToReplace,

and a positive integer count, and returns a new string such that each character in origString that occurs in charsToReplace is replaced by n consecutive copies of that character (with the same case as in the original). For example,
Computers and Technology
1 answer:
laila [671]3 years ago
8 0

Answer:

The code of the above program is provided below. using Python

Explanation:

<u>Code in Python 3:- </u>

def modifyString(origString,charsToReplace,count):

# Make s1 as original string

s1=origString

# Make s2 as charsToReplace string in lowercase

s2=charsToReplace.lower()

# Make s3 as charsToReplace string in uppercase

s3=s2.upper()

# Initialize answer as an empty string

ans=''

# Iterate the string upto length times

for i in range(len(s1)):

# check for chars in the string and append to the answer

if (s1[i] in s2) or (s1[i] in s3):

ans=ans+count*s1[i]

else:

ans=ans+s1[i]

# return the final string

return ans

print(modifyString("Our cat is funny","aeiou",5))    

print(modifyString("Our cat is funny","zu",3))

You might be interested in
Which of the following is NOT one of the three main ways to control a program when writing code?
Irina-Kira [14]

Answer:

Derivative

Explanation:

Sorry if im wrong.

4 0
3 years ago
Read 2 more answers
. Write a code to define a linked list node using the above defined structure student (i.e. the data of the node is a student st
enyata [817]

Answer:

struct node{

   student data;

   node* next;

};

Explanation:

The above written is the segment of code is the structure of node of the linked list.The data of the node is type student.So the data of the node of the linked list will consist of the student details and the next is the pointer which holds the address of the next node.

8 0
4 years ago
Who tryna play among us
harkovskaia [24]

Answer:

I'm doing a digital media test right now

8 0
4 years ago
Read 2 more answers
Why is Brainly always deleting either my answers or my questions? I am putting nothing inappropriate in them. Can someone answer
Artist 52 [7]

Answer:

hey i do not know

Explanation:

3 0
4 years ago
Read 2 more answers
Verizon's implementation of a web-based digital dashboard to provide managers with real-time information such as customer compla
elena55 [62]

An example of  improved efficiency is Verizon's use of a Web-based digital dashboard to give management access to real-time data such as customer complaints.

<h3>What does the term " improved efficiency" mean?</h3>
  • Efficiency improvement refers to the improved value and/or quality that a company achieves as a result of changing a service or the manner in which a service is offered.
  • This improvement might be more expensive, but it is worth more in comparison.
  • Being effective in your daily operations can help you raise productivity, boost production output, and get rid of time-consuming administrative activities.
  • It might also imply that you don't need to rely as heavily on costly machinery, unreliable external suppliers, or even temporary workers.

To learn more about improved efficiency, refer to:

brainly.com/question/7690431

#SPJ4

5 0
2 years ago
Other questions:
  • You will use the _____
    15·2 answers
  • Which three skills are useful for success in any career?
    8·1 answer
  • Passwords are usually alphanumeric and usually cannot contain spaces or ________.
    10·2 answers
  • One shortcoming of rapid application development (RAD) is _____.
    9·1 answer
  • Helppp plzz ajjsndndbsskdjf​
    11·1 answer
  • Because it manages all other software the computer which software is most important
    5·2 answers
  • Anyone tell my answer.
    15·1 answer
  • Definition of Computer forensics?
    12·2 answers
  • Which of the following factors is least likely to result in delivery delays?
    7·1 answer
  • if a manager identifies numerous data integrity issues, she/he should consider the reports generated from that data as invalid a
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!