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
Choose ALL guidelines listed below pertaining to fair use.
tino4ka555 [31]

Answer:

Introduction

As you write blog posts, you may find that you want to include images you find online. Or maybe you found a great piece of writing—a recipe, a story, or a review—that you want to highlight on your own blog. It's important to know that almost all of the content you find on the Web belongs to someone. Just because you can take images, text, and more from other sites doesn't mean it's right to do so—ethically or legally.

In this lesson, you'll learn about the copyright protections that apply to work posted online. You'll learn about the rules that determine which images and text you can use, and how you can use them. You'll also learn how to protect the content you create.

The laws discussed in this lesson are United States laws. No lawyer was involved in preparing this lesson. We are not legal experts, and this lesson should not be taken as legal advice.

Understanding copyright

Copyright is the legal concept that works—art, writing, images, music, and more—belong to the people who create them. According to copyright law, any original content you create and record in a lasting form is your own intellectual property. This means other people can't legally copy your work and pretend it's their own. They can't make money from the things you create either.

To use, copy, or change a copyrighted work, you need permission from the person who holds the copyright. This permission is called a license. Even though everyone has the right to require that others respect their copyright and ask permission to use their work, some people and organizations choose to license their content more freely. They do this by giving their work a Creative Commons license or by placing their work in the Public Domain.

6 0
3 years ago
Read 2 more answers
__________ is a computer tool for evaluating the risk of exposure to wildfires.
Brut [27]

Answer:

The statement is true

Explanation:

5 0
2 years ago
Read 2 more answers
A large population of ALOHA users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slo
krok68 [10]

Answer:

The answer is below

Explanation:

Given that:

Frame transmission time (X) = 40 ms

Requests = 50 requests/sec, Therefore the arrival rate for frame (G) = 50 request * 40 ms = 2 request

a) Probability that there is success on the first attempt = e^{-G}G^k but k = 0, therefore Probability that there is success on the first attempt = e^{-G}=e^{-2}=0.135

b) probability of exactly k collisions and then a success = P(collisions in k attempts) × P(success in k+1 attempt)

P(collisions in k attempts) = [1-Probability that there is success on the first attempt]^k = [1-e^{-G}]^k=[1-0.135]^k=0.865^k

P(success in k+1 attempt) = e^{-G}=e^{-2}=0.135

Probability of exactly k collisions and then a success = 0.865^k0.135

c) Expected number of transmission attempts needed = probability of success in k transmission = e^{G}=e^{2}=7.389

6 0
3 years ago
A section-lined area is always completely bounded or outlined by an?
Paraphin [41]
Visible outline.
hope this helps
8 0
3 years ago
What was the history of technology since the 1980s to now and how is it used in classrooms?.?. PLEASE HELP
levacccp [35]

Answer:

Please check the explanation.

Explanation:

The US education department mentioned that in 1900 there were only 10% of students enrolled in the schools, however by the end of 1992, the percentage increased by 85% and it became 95%. In 1930 1 million students were enrolled in university. And by 2012, it became 21.6 million. The teachers began to follow a new type of teaching, and the academics began to follow a special method for communique, education as well as for helping the students understand the concepts.

Though, after the 1980s the personal computer came into being in schools and colleges. Since then numerous versions of PC have originated in the marketplace as well as mobiles tracked by Smartphones, and now nearly 100% of people in the US have smartphones. Virtual reality, augmented reality, AI, Machine learning. etc. has cemented the way for the virtual classrooms. Also, each subject is now up with fruits and not just-food. The consequence is such a delightful setup of the Virtual schoolrooms in the entire US, and all over the ecosphere. The projectors, VR devices, AI applications for education, online classroom facility, Electronic version of chalkboards, and in fact everything is no sophisticated, and it is making not only teaching easy but learning as well. And the result is, students are ending up with better results, and teachers seem to be happier and more relaxed. And that is making school management satisfied as well.

3 0
3 years ago
Other questions:
  • Name size of machine screw that is used to secure switches and receptacles to device boxes
    13·1 answer
  • Which object waits for and responds toan event from a GUI component?
    9·1 answer
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by
    10·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • HELP PLZ !!
    13·1 answer
  • Secondary hard drive whats its purpose
    5·1 answer
  • A term to describe articles that can be displayed in their entirety,as opposed to abstract and references only
    11·1 answer
  • The use of a concept or product from one technology to solve a problem in an unrelated one
    11·1 answer
  • State any three reasons why users attach speakers to your computer​
    15·2 answers
  • Fill in the blank: Every database has its own formatting, which can cause the data to seem inconsistent. Data analysts use the _
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!