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
OO<br>(A) 3 and 5<br>(B) 4 and 8<br>(C) 2 and 0<br>(D) 6 and 9<br>2. There are twelve books on a shelf and four children in a ro
dlinn [17]

Explanation:

2.there will be 8 books left on the shelf if each child takes one

8 0
3 years ago
The two roots of a quadratic equation, for example 2 + + = 0, can be obtained using the following formula: Two Roots: 1 = − + √
Vladimir79 [104]

lst = input("Enter a,b,c: ").split(",")

a = float(lst[0])

b = float(lst[1])

c = float(lst[2])

root1 = (-b + ((b**2-(4*a*c))**0.5))/(2*a)

root2 = (-b - ((b**2-(4*a*c))**0.5))/(2*a)

dis = b**2 - (4*a*c)

if dis > 0:

   print("The roots are {} and {}".format(root1, root2))

elif dis < 0:

   print("The equation has no real roots")

else:

   print("The root is {}".format(root1))

I wrote my code in python 3.8. I hope this helps!

5 0
3 years ago
Choose the word that best completes this sentence. Caught-in and caught-between injuries result from a person being squeezed, ca
loris [4]
I do not know, i really hope you dont fail!!!!!!!!!
8 0
3 years ago
Read 2 more answers
Edhesive 4.8 question 3​
Alex777 [14]
How may I help u today sir
7 0
3 years ago
Public speaking and composition writing are very similar forms of communication. True False
Harman [31]

True facts right there

4 0
4 years ago
Other questions:
  • Binary search requires that data to search be in order. true or false
    5·1 answer
  • Which technology can be used to protect the privacy rights of individuals and simultaneously allow organizations to analyze data
    13·1 answer
  • How to download goose simulator the game for free<br><br>pls tell me
    6·2 answers
  • Which language would you use to create scripts that send data to a web server?
    12·2 answers
  • From an audio standpoint, how would a city street rate as a possible film location? great because city streets are interesting t
    15·1 answer
  • Proofreaders' marks are:
    6·1 answer
  • What effect is this most likely to have in readers
    15·1 answer
  • Chief technology officers can influence a company's current and future ____.
    9·1 answer
  • Favorite friends character and why GO!
    8·2 answers
  • I can’t get answers because the ads won’t load help me
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!