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
astra-53 [7]
3 years ago
7

Create a function called "strip_r_o" that takes in a STRING and strips all the Rs and Os from the string. Also use a FOR loop in

you program to check each letter of the STRING
Python

Computers and Technology
1 answer:
Arada [10]3 years ago
7 0

Answer:

The program is as follows (Take note of the comments and see attachment)

#Start of Program

def strip_r_o(word): #Declare Function strip_r_o

     resultt = "" #initialize resultt to empty string

     for i in range(len(word)): #Iterate from first character of input string to the last

           if (not word[i] == "R") and (not word[i] == "O"): #Check if current character is not R and O

                 resultt = resultt + word[i] #if condition is true, add character to resultt

     print(resultt) #Print string after character has been removed

#End of Function

Word = input("Enter a string: ") #Prompt user for input

strip_r_o(Word) #Call strip_r_o function

#End of Program

Explanation:

The program starts and end with a comment

Line 2 of the program declares function strip_r_o

Line 3 initializes a string variable resultt to an empty string

Line 4 iterates from first character of input string to the last  

Line 5 checks each character for O or R

If true, line 6 is executed by removing O or R from the input string and saving what's left in variable resultt

Line 7 prints the end result after O and R have been removed from the input string

Line 8 is a comment

Line 9  prompts user for an input string

Line 10 calls the strip_r_o function

You might be interested in
The chart shows changes in sea level from 1995 to 2013. According to the chart, sea levels rose at an average annual rate of 3.2
MariettaO [177]

Answer:

Did the global surface temperature increase steadily from 1995 to 2013?

Did sea ice extent in polar regions reduce because of melting from 1995 to 2013?

Explanation:

Only two questions are directly related to global warnings increasing sea levels:

  • Did the global surface temperature increase steadily from 1995 to 2013? Increasing temperature of the Earth's surface is actually what warming means.
  • Did sea ice extent in polar regions reduce because of melting from 1995 to 2013? If the polar ice melts then the sea levels will rise.

The other three questions were about the negative effects of rising sea levels, but not what could cause them.

5 0
3 years ago
Read 2 more answers
The web lab consists of which elements. Select all that apply. Group of answer choices Files Inspector Tool Preview Hints Work S
djverab [1.8K]

Answer:

Inspector Tool

Preview

Work Space

Instructions

Explanation:

Web Lab is a function that incorporates HTML in web development. It has functions such as Workspace where the developer writes the body of the website. Preview helps the developer take a look at the final product of what he is creating. Instructions panel provides a list of the different types of html packages that the developer can chose from.

All of these options help the developer produce a website that is up to standard.

8 0
2 years ago
Has anyone used freya on Mobile legends bang bang
Vsevolod [243]
Yeaaaaahhh it’s so fun
4 0
3 years ago
Read 2 more answers
Corona and app inventor can be used to develop ________.
Sidana [21]
<span>Corona and app inventor can be used to develop apps for smartphones. Corona can be used to build both games and apps from major platforms like iOS, Android, Kindle, Apple TV, Android TV, macOS, and Windows. App Inventor was originally provided by Google and is now maintained by MIT.</span>
3 0
3 years ago
Match the part of the browser window to the correct description.
hodyreva [135]

Answer:

1. Tabs: allows you to drag the window to a new location

Explanation: Tab is the key that is used to switch between different windows or websites that are opened at a time. This can be done by pressing Ctrl+Tab

2. Status Bar: displays whether the Web page is secure or not

Explanation: Status bar is used to show the status or information related to that page. Like Information related safety precaution.

3. Title Bar: allows you to quickly move between different Web sites

Explanation: Title bar consist of the name of different websites that are open at particular time. This shows at the top of the browser. We can quickly move on different websites using title of website.

4. Bookmarks: save Web addresses so you can return to them quickly

Explanation: Bookmarks are the pages that we save in bookmark menu, to re-open the page whenever its needed.

4 0
3 years ago
Other questions:
  • Dinah is using an IDE to write, modify, and save code. Which tool should she use?
    11·2 answers
  • What does the term World Wide Web refer to?
    5·2 answers
  • Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
    5·1 answer
  • (1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
    5·1 answer
  • How do you check how much space is left in current drive?
    9·1 answer
  • When you are almost done with your soup and want to get at the last little bit, how should you do this 2
    5·1 answer
  • Which type(s) of license(s) allow the underlying software code to be viewed?
    15·1 answer
  • Rebbeca has finished with the research and outline portion of her slide presentation. Now, the next logical step is to begin wor
    11·1 answer
  • This unintelligent brain of mine decided to charge my phone overnight thinking that nothing bad will happen ;-; the next morning
    11·1 answer
  • Jazmine just finished setting up an operating system that's designed to work between a VM guest OS and computer hardware. What i
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!