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
snow_lady [41]
2 years ago
9

Write a program that takes a string as an input. If the string entered is equal to

Computers and Technology
1 answer:
Ivenika [448]2 years ago
3 0

The program could be written using a python script.

<h3>Python script on string operation</h3>

The program takes a string as an input. First, declare a variable for the input:

var = str()

#The above code will ask for a string to be inputted

Next would be to condition the script in a particular direction using the 'if' statement. That is, a Boolean function.

if var ==('chicken'):

#The above code will compare the inputted string to the word 'chicken'.

  print("This is equal")

#The screen will display 'This is equal' if the inputted stringis the same as 'chicken'.

else:

  print("This is not equal")

#The screen will display "This is not equal" if the inputted string is not the same as 'chicken'.

In summary, the code goes thus:

var = str()

if var ==('chicken'):

   print("This is equal")

else:

   print("This is not equal")

More on python scripts can be found here: brainly.com/question/14378173

#SPJ1

You might be interested in
maximum cardinality indicates whether or not an instance of one entity class must be related to at least one instance of another
vladimir1956 [14]

This is false.

What is cardinality?

Cardinality refers to the entity instances for which it is eligible to participate in a relationship instance. There are two types of cardinality, maximum and minimum.

What is maximum cardinality?

  • The maximum cardinality of a relationship is the maximum number of instances of entity B that may be associated with each instance of entity A.
  • Maximum cardinality: maximum number of entity instances that can participate in a relationship.
  1. One-to-One [1:1]
  2. One-to-Many [1:N]
  3. Many-to-Many [N:M]

To know more about maximum cardinality , refer:

brainly.com/question/18090451

#SPJ4

4 0
1 year ago
Create a Racket procedure compute_pos that reads numbers from the keyboard until 0 is read, count how many positive numbers are
Artyom0805 [142]

Answer:

import java.util.Scanner;

public class Solution {

   public static void main(String args[]) {

       compute_pos();

     }

     

     public static void compute_pos(){

     Scanner scan = new Scanner(System.in);

     int sum = 0;

     int counter = 0;

     // Prompt the user to enter an input

     System.out.println("Enter your value");

     // user input is assign to the variable value

     int value = scan.nextInt();

     

     while(value != 0){

         if (value > 0){

             sum += value;

             counter++;

         }

         System.out.println("Enter your value");

         value = scan.nextInt();

     }

     // Display the value of sum to the user

     System.out.println("The sum of the positive number is: " + sum);

     // Display the value of counter to the user

     System.out.println("The number of positive number is: " + counter);

   }

}

Explanation:

The first line import the Scanner class which allow the program to read input from the user. The class Solution is then defined. Then the main method which signify the beginning of execution in the program is defined. A method is called inside the main method.

The method compute_pos is defined. Inside the compute_pos method, a scanner object scan is declared to accept input from the user via the keyboard.

The variable sum and counter is declared and assigned to 0.

A prompt is displayed to the user to input a value. The user input is accepted and stored in the variable value.

Then a while loop is use to check the user input if it is not equal to zero. If it is equal to zero, the loop will end. Inside the loop, we first check to see if the user input is greater than 0, if it is, we add it to the variable sum and increase our counter by 1. At the end of the loop, a prompt is again display to accept input from the user.

Outside the loop, we display the sum and counter to the user.

8 0
3 years ago
To get revenge on the pizza parlor burning his pizza and not reimbursing him for it, David returned to the pizza parlor after-ho
Andrew [12]
David will be charged with arson<span />
3 0
3 years ago
Read 2 more answers
Como desbloqueo paginas web en windows 7
dimulka [17.4K]

Answer:

WHAT IN EGLISH PLZ

Explanation:

4 0
2 years ago
What is the extraction method?
KATRIN_1 [288]

Explanation:

When there are more than substances mixed together it is difficult to separate  a particular substance.We use extraction in order to do that.

Extraction is a process to separate the desired substance when it is mixed with some other substances.

The method used to extract the substance from other substances is called extraction method.

7 0
3 years ago
Other questions:
  • From the video "Your Password Sucks", using computer power to guess your password by trying multiple variations one after the ot
    15·2 answers
  • Does anyone have any social media message me
    14·1 answer
  • What activities are the most likely to infect your computer with a virus? Check all that apply
    11·2 answers
  • The ____ command displays the last 10 lines of a text file.
    5·1 answer
  • A program that contains the following method: public static void display(int arg1, double arg2, char arg3) { System.out.println(
    15·1 answer
  • Which best describes a difference between transcription and DNA replication
    8·2 answers
  • How do you mark the brainiest?
    8·2 answers
  • Which computers accuracy is much higher(i.e.analog &amp; digital )​
    14·1 answer
  • An operating system with _____ capabilities allows a user to run more than one program concurrently.
    6·1 answer
  • what new technology led to the chaos that spurred the establishment of the federal communications commission?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!