answer.
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
Ede4ka [16]
2 years ago
6

"Write a function named remove_all that accepts" a string and a character as parameters, and removes all occurrences of the char

acter. For example, the call of remove_all("Summer is here!", 'e') should return "Summr is hr!". Do not use the string replace function in your solution.
Computers and Technology
1 answer:
neonofarm [45]2 years ago
7 0

Answer:

def remove_all(text, char):

   return ''.join(x for x in text if x not in char )

           

print(remove_all("Summer is here!", 'e'))

Explanation:

- join() method in Python takes all the element in the string and joins them. However, inside the <em>join</em> method, we <u>excluded</u> the elements that equals to <em>char</em> in the <em>text</em>

You might be interested in
A mistake programmers often make with loops is that they ____.
Soloha48 [4]

I think the best answer is D. Initialize the loop control variable prior to entering the loop body.

Please correct me if I'm wrong!! I'd be happy to fix it!! :)

4 0
2 years ago
When you use a while loop to compute the product of several values, you should initialize the variables holding the product to _
Allushta [10]

Answer:

b.1

Explanation:

When we are using while loop to compute the product of several values we need to initialize the value holding the product to 1 because when we multiply something with 1 it will give the same number.

If we initialize it with 0 the product will come out to be 0 because  anything multiplied by 0 is 0.

we cannot initialize it with NULL because it is not a pointer.

We need to initialize the number since it contains garbage values so it will give product with that value.

3 0
2 years ago
Kathy is a senior teacher in her school. She is conducting a group discussion between parents and teachers. Her role is to ensur
Fynjy0 [20]
She is the leader of the discussion
3 0
2 years ago
Read 2 more answers
The domains of the risk IT framework mutually inform each other, creating flexibility and agility. It is possible to uncover a p
Andrej [43]

Answer:

The best option is A).True

Explanation:

This is because, according to the statement, it is possible to uncover a potential threat in the risk governance domain and quickly assess its impact using the risk evaluation domain in an IT environment. The risk IT framework is used in an IT environment for security of domains, the business involved, etc.

6 0
2 years ago
While rendering the homepage of a website, it takes a lot of time due to the thread being blocked in processing JS/CSS. What are
jekas [21]

Answer:

a) Pick ONE OR MORE options Using code-splitting for JS files.

b) Compressing the JS files on the server-side

Explanation:

Javascript is a multi-purpose programming language, it is used in web development as a scripting language for programming the interactiveness of the web application.

Loading and running the script from the server can take a lot of time, so, the file is compressed and split for faster loading.

6 0
2 years ago
Other questions:
  • A telephone-repair technician uses a meter to measure voltage on a phone line. This meter is an example of _____. hardware softw
    10·2 answers
  • The part of the computer that contains the brain, or central processing unit, is also known as the A.monitor B.modem C.keyboard
    10·1 answer
  • The java compiler requires that a source file use the ________ filename extension question 3 options: 1) .class 2) .h 3) .java
    8·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • ________ is a free online service that enables a user to contact a cell phone number to hear who answers the telephone without i
    5·1 answer
  • Write a function that takes a string like 'one five two' and returns the corresponding integer (in this case, 152). A function j
    11·2 answers
  • Consider two vectors that are NOT sorted, each containing n comparable items. How long would it take to display all items (in an
    8·1 answer
  • Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
    8·1 answer
  • Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lowe
    8·1 answer
  • Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use adv
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!