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
Crazy boy [7]
2 years ago
8

Write a program that print "Censored" if userInput contains the word "darn", else print userInput. End with newline.

Computers and Technology
1 answer:
Ainat [17]2 years ago
7 0

Answer:

userInput = input("Please enter a string of words ")

userInput.split ()

for item in userInput.split ():

   if item =="darn":

       print("Censored")

       break

else:

   print(userInput)

Explanation:

Using Python programming language, the input function is used to receive the users input and save in a variable userInput

Then the .split method is used to convert the words into a list of words.

Using a for loop, the code checks for the word darn and prints censored if it exists else it prints the userInput

You might be interested in
What is the python print of (“5”+”7”)?
Firdavs [7]

Answer:

57

Explanation:

Since the 5 and the 7 don't represent integers instead they represent strings so it would come out as 57 hope I helped!

4 0
3 years ago
When you divide a picture into thirds, how many parts do you end up with? *
lara31 [8.8K]

Answer:

3

Explanation:

6 0
3 years ago
Read 2 more answers
1. A truck leaves a stop sign and accelerates uniformly over a time of 5.21 seconds for a
Rufina [12.5K]

Answer:

1, is 21.11 meters per second.

110/5.21

Explanation:

3 0
3 years ago
In his article, “How to Publish Without Perishing,” what does James Gleick believe most people do when they really read a book?
jonny [76]

Answer:

James Gleick believes that they immerse themselves in a rich textual world. The answer is C.

3 0
2 years ago
Read 2 more answers
Kathleen has written this paragraph:
yarga [219]

Answer:

Positive media attention can transform communities in unexpected ways.

Explanation:

According to the given excerpt, it is narrated that Kathleen wrote about a town called Abbston that was recently overwhelmed by tourists as a result of the news article by a TV travel editor who wrote about the town.

Therefore, the best concluding sentence for the paragraph would be that positive media attention can transform communities in unexpected ways.

8 0
3 years ago
Read 2 more answers
Other questions:
  • I really need help please abari is writing a program which prompts a user for a value without a decimal. Which function should h
    8·1 answer
  • Cyberterrorism is the use of terrorism to attack (Points : 1) public libraries. computer based networks. government spy networks
    15·1 answer
  • Truck drivers probably cannot see your vehicle if you cannot
    6·2 answers
  • Web browsers are used to browse the world wide web.
    5·2 answers
  • The type of database that is connected by a company's local area networks is a(n:
    11·1 answer
  • Mention 3 components that can be found at the back and front of the system unit​
    6·1 answer
  • Compare and contrats the vain digestive system from the human digestive system.​
    10·1 answer
  • Create a Flowchart and write pseudocode for a program that allows the user to enter two integer values: a and b.
    8·1 answer
  • Which user interface part shows graphical output of mined data?
    8·2 answers
  • What are the two most common input and output devices?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!