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]
3 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]3 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
How do you suppose a request travels from one computer to another? How does the request know where to go?
Luden [163]
It can request a signal then transfer certain data points and provide the request. The request knows where to go using certain lines in the data.
4 0
2 years ago
Can someone help me answer this, I can’t fail tysm :)
nalin [4]
Don’t know what the answer is but do you, I have the test for that today
5 0
3 years ago
BRAINLIEST ANSWER AWARDED PLEASE HELP
Aleksandr-060686 [28]
When a formula produces output that is too lengthy to fit in the spreadsheet cell, the error that will show is "#####". When you enter an invalid cell reference in a formula, for instance using "AVE(" instead of "AVERAGE("; the error that will show is "#NAME?". When you type text in cells that accept numeric data, for instance adding 1 + 1 + A; then the error that will show is "#VALUE". Lastly, when you type in a cell reference that does not exist, the error that will show is "#REF".
4 0
3 years ago
In Full Screen Reading View, which area is reduced?
REY [17]

Go to options .

  • Suppose you are reading a document .
  • You want to read in full screen .
  • Hence the Go-to bar will be reduced .
6 0
3 years ago
What is NOT powered by the PSU of your computer?
Yuliya22 [10]
Peripherals like your monitor or your printer.
3 0
3 years ago
Other questions:
  • Describe the function of the user account section of the control panel
    13·1 answer
  • Please Help!<br><br>in return brainliest and special thanks
    5·1 answer
  • Why is knowledge of percent composition important in the mining process?
    7·1 answer
  • If you're using the paintbrush tool and want to change the color of the paint being used what should you change
    6·1 answer
  • What is the purpose of exporting your public key to the directory services server?
    11·1 answer
  • Your friend Suzy calls to ask for help with her computer. She says when she first turns on the computer, she doesn’t hear a spin
    10·1 answer
  • A recursive method without a special terminating case would _________. Hint: Self Check 13.3 had infinite number of isLucky() me
    5·1 answer
  • Harrison works in a manufacturing unit and oversees the logistics, including the daily shipping of a large number of packages. W
    12·2 answers
  • Imagine a mythical set of protocols with the following details. Maximum Link-Layer data frame: 1,455 bytes Network-Layer header
    8·1 answer
  • You are the Emergency Management Director of a small island nation. Your nation has come under Cyber-attack and the attackers ha
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!