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
AysviL [449]
3 years ago
10

One thing we might want to know, given an input to a chatbot, is if the input is a question.

Computers and Technology
1 answer:
3241004551 [841]3 years ago
5 0

Answer:

Following are the code to this question:

def is_question(input_string): # defining method is_question  

   output = '?' in input_string # checking question mark symbol in value

   return output #return value

input_string = input('Enter any string value: ') # defining variable input_string to input value

print (is_question(input_string)) # call method and print return value

Output:

Enter any string value: what is your name?

True

Explanation:

In the given python program code, a method "is_question" is declared, which accepts an "input_string" value in its parameter.

  • Inside the method, an output variable is used, that search question symbol in the parameter value and return its value.
  • In the next step, the input_string variable is declared, which uses the input method to accepts string value and passes into method calling time and print its return value.
You might be interested in
Uses computers resources from multiple locations to solve ​
kodGreya [7K]

Answer:

computers are solve all things in are life

3 0
3 years ago
Read 2 more answers
PLEASE HELP
kap26 [50]

Answer:

dog

Explanation:

The python program has four lists, A, B, C, and E which is a list of the first three lists. Lists are unordered indexed data structures, it is accessed by an index starting from 0 to n (which is the length of the list minus one).

The E list is a list of lists with three list items starting from index zero to two. E[0][1] is used to access the item "dog" in the first list item of the E list.

3 0
3 years ago
What could be a summary sentence or phrase that captures your writing experience?
Natasha2012 [34]

<u>Answer:</u>

<em>A summary sentence should brief the whole content “what so ever the length of the original content” may be. </em>

For example, if you take a story, <em>moral will be the good example of summary. </em>One another example is when the teacher taught concept in the classroom, in the last few minutes of the class the teacher <em>would brief the whole into smaller points. </em>

Even nowadays, people go and visit movies only after seeing the review online. So once again the review is a small brief about the movie in one or two lines. <em>It should be crisp, use cherry-picked words, etc.</em>

3 0
3 years ago
For java
Sedbober [7]

Answer:

public class array{

    public static void main(String []args){

       int[] array = {2,4,7,1,9};

       int num_vals = array.length;

       for(int i=0;i<num_vals;i++){

           

           System.out.println(array[i] + " ");

       }

       for(int i=num_vals-1;i>=0;i--){

           

           System.out.println(array[i] + " ");

       }

    }

}

Explanation:

First create the class in the java programming.

Then create the main function and declare the array with values.

Store the size of array in num_vals variable by using the function array.length.

create a for loop to iterate the each element in the array and then print on the screen with spaces and newline.

it traverse the loop from first to last.

Then, again create the for loop to iterate the each element in the array and then print on the screen with spaces and newline but the traversing start from last to first.

8 0
3 years ago
Which of the following is the java comparison operator for "not equal to"
Sveta_85 [38]
You need to provide "the following", otherwise other users cannot answer your question.

However, the Java operator for "not equal to" is "!=".


// For example.
if (1 != 2) {
    System.out.println("1 doesn't equal 2");
}


The if-statement in the code above will always run, since 1 is not equal to 2.
8 0
3 years ago
Other questions:
  • A technician wants to create a new partition on a new additional hard drive. what tool should be used?
    15·1 answer
  • Rebooting the computer is a good troubleshooting technique.<br><br> True<br> False
    6·2 answers
  • Terms that represents the achual speed used by device to transfer data​
    14·1 answer
  • The cold war actually helped in the development of the internet true or false
    8·1 answer
  • Write a program Gas.java that computes and displays the price a person will pay for gas at the gas station. The program takes th
    12·1 answer
  • What is the Slide Sorter View used for?
    12·2 answers
  • You must. place a child in a federally approved child restraint device. if the child is
    5·2 answers
  • how do I delete my brainly account, my child signed up for it and nothing has been paid but I do not want the account to exist a
    7·2 answers
  • Discuss the ways you can perform to prevent your computer/device and its data/contents from being stolen. Define two-facto authe
    7·1 answer
  • Bank Account Postings While reviewing your checking account balance online, you notice that debit card purchases have not posted
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!