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
A new computer workstation has been installed in a small office. the user of the workstation can print a document using a networ
ICE Princess25 [194]
The printer is setup as a local printer therefore it does not need access to internet to access the local network printer. Once the new workstation is given access to the terminal server used for the printer, it will not need to connect on the internet to print. Now, if the workstation is not able to access the internet it could be potentially due to incorrect configuration of DNS to the workstation or actual issue is within the ISP.
3 0
3 years ago
Search engines enable you to:A. talk to people via the computer.B. locate Web pages related to a specific subject.C. connect to
GalinKa [24]
The correct answer is B. locate Web pages related to a specific subject.

An example of a search engine is Google: it helps you find Websites with the content you're looking for.
3 0
3 years ago
Which sign or symbol will you use to lock cells for absolute cell reference?
ivanzaharov [21]
It's asterisk hope this helped
7 0
3 years ago
Read 2 more answers
What is the name of small programs stored on the hard drive that tell the computer how to communicate with a specific hardware d
Katena32 [7]
Small programs stored on the harddrive that provide basic functionality for he devices listed would be called Hardware Drivers.
I hope this helps!
5 0
3 years ago
........ manages the function of all the hardware and other software used in the computer.
Ivenika [448]

Answer:

The answer to this question is given below is in the explanation section.

Explanation:

manages the function of all the hardware and other software used in the computer:

operating system is defined as a system software that manages computer hardware and software resources and provide common services for computers programs.All application software computer programs requires an operation system to  function. operating system controls computer hardware run the computer programs and organize file.

CPU:

central processing unit that bring the instruction from memory to be executed and decodes.

Storing device:

Any hardware that can hold information temporarily and permanently. we distinguish two type of storage: as primary storage device and a secondary storage device.

Example:

  1. Magnetic storage device:hard drive,floppy diskette etc.
  2. optical: Blu-ray disc,CD Rom disc.

Flash memory device:memory card memory sick,ssd

Hardware:

Hardware include the physical features,which are every part that you can either see or touch, for example monitor,case,keyboard,mouse and printer.

Software:

The part which activate the physical components called software. it includes the features that resposible for directing the work to the hardware.

8 0
3 years ago
Other questions:
  • If you paste a word document text into an excel spreadsheet, the paste optio allow you to keep source formatting or
    9·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    7·2 answers
  • What is a bug?
    11·2 answers
  • Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checki
    8·1 answer
  • List the seven basic internal components found in a computer tower
    12·2 answers
  • When targeting customers of the consumer population at market a product, what type of segmentation information would be most hel
    12·2 answers
  • Which business case is better solved by Artificial intelligence than conventional programming?<br>​
    8·1 answer
  • Please Help!
    13·1 answer
  • Please help ASAP!
    7·2 answers
  • I need a C++ program to ask the user to put in different numbers until zero is pressed then the program counts the numbers that
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!