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
Design and implement an application that reads an integer value representing a year from the user. The purpose of the program is
olga55 [171]

Answer :

Written in java

import java.util.Scanner;

public class Main{

   public static void main(String[] args) {

       int year;

       Scanner scanner = new Scanner(System.in);

       System.out.print("Please enter a year\n\n");

       year = scanner.nextInt();

       while (year < 1582) {

           System.out.print("\nPlease enter a different year above 1582\n");

           year = scanner.nextInt();

       }

       if (year % 4 == 0) {

           if(year % 100 ==0 && year % 400 != 0){

                   System.out.println(year + " is not a leap year\n\n");

           }else {

               System.out.println(year + " is a leap year\n");

           }

       } else {

           System.out.println(year + " is not a leap year\n\n");

       }

   }

}

4 0
3 years ago
What is the definition of Simplex transmission and Duplex Transmission?
ira [324]

Answer:

Alternatively referred to as simplex communication or simplex transmission, simplex is a one-way only communication standard that broadcasted information may only travel in one direction. This method is different than duplex transmission, which allows for two-way broadcasting. Examples of simplex include radio broadcasting, television broadcasting, computer to printer communication, and keyboard to computer connections.

Explanation:

computers

6 0
4 years ago
What finger is used to key letter c
kumpel [21]

Answer:

your pointer finger

sorry if this is wrong

Explanation:

8 0
3 years ago
Read 2 more answers
. Reorder the following efficiencies from smallest to largest:
alexdok [17]

Answer:

The order of the efficiencies is as following:-

10,000 < 2n < nlog(n) < n5 < n!.

Explanation:

10,000 is constant time whatever will be the size of the problem the efficiency will remain the same.

2n this efficiency is linear it will grow proportionally as the size of the problem increases.

nlog(n) this efficiency is is a bit greater than 2n though it will grow faster than 2n but slower than n2 as the size of the problem increases.

n5 this efficiency is very poor.It is growing very rapidly as the size of the problem increases.

n! is the worst efficiency of them all.

n!=n*(n-1)*(n-2)*(n-3)*(n-4)*.......2*1.

It will grow beanstalk in jack and the beanstalk.

3 0
3 years ago
Each TextField has a text property that's returned by its textProperty method as a StringProperty. The StringProperty method ___
masha68 [24]

Answer:

B: Bind

Explanation:

JavaFX property binding permits the synchronization of the value of two properties in such a way that whenever there is a change in one of the properties, there is an immediate update on the value of the other property. In this way, The StringProperty method bind receives an ObservableValue as an argument. When the ObservableValue changes, the bound property is updated accordingly.

4 0
3 years ago
Other questions:
  • What is a device driver?
    9·2 answers
  • Which is the most important reason you should properly cite information that you obtain from an Internet search? Question 2 opti
    8·1 answer
  • Which of the following typically have the highest auto insurance premiums?
    14·1 answer
  • In which of the following situations will a macro make your work more efficient?
    7·1 answer
  • Connie decided that her paper should be organized in the order in which the events happened. What type of organizational method
    15·1 answer
  • First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==&gt; Close All Projects).
    6·1 answer
  • Select the correct statement(s) regarding CENTREX. a. CENTREX systems reside at the service providers central office, however, t
    11·1 answer
  • How many sections of a job description are there
    5·1 answer
  • Question 8 of 10
    12·1 answer
  • Which of the following shows how to correctly declare pointer variable x?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!