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
grin007 [14]
3 years ago
11

3. Write a program that has the user enter two Strings. Display whether the first String is less than (comes first alphabeticall

y), equal to, or greater than (comes after alphabetically) the first.
Computers and Technology
1 answer:
Citrus2011 [14]3 years ago
4 0

Answer:

The solution code is written in Python 3

  1. firstStr = input("Enter first string: ")
  2. secondStr = input("Enter second string: ")
  3. if(firstStr < secondStr):
  4.    print("The first string comes first alphabetically.")
  5. elif(firstStr > secondStr):
  6.    print("The second string comes first alphabetically.")
  7. else:
  8.    print("The first and second string are same")

Explanation:

Firstly, prompt the user to input two strings (Line 1 - 2).

Next create if else if statement to check if the firstStr is less than, greater than or equal to the secondStr and then print the appropriate message accordingly (Line 4- 9). For example, the program display message "The first string comes first alphabetically." if it find the firstStr is less than secondStr.

You might be interested in
Which type of operating system is usually used in personal computers?
castortr0y [4]
Windows 10 thru 7 home and some people use mac osx
7 0
3 years ago
Read 2 more answers
When you save a drawing using paint, it's automatically stored as a?
serious [3.7K]

Answer:

Bitmap File

Explanation:

6 0
3 years ago
Which form of currency is not backed by gold today
Len [333]
I think it might be the USD but I'm not sure. 
5 0
3 years ago
Who was responsible for the development of the rocket motor?
kiruha [24]

Answer: Robert H. Goddard

Explanation: he developed and flew the first liquid-propellant rocket

6 0
3 years ago
Read 2 more answers
Sam works in a real estate office. An offer comes in on a house but the homeowners are on vacation. He needs the homeowners to s
Digiron [165]

Answer:

Sam should send a digital document and request a signature. The could be fax or even an image printed out, if neither is possible get in contact with eh owner and his lawyer for more help.

Explanation:

3 0
3 years ago
Other questions:
  • Jose calls you at the help desk because he is having a problem logging on to his laptop computer. After several unsuccessful att
    14·1 answer
  • While visiting a web site during your lunch break, you see a window that states the web site will not operate properly without f
    13·1 answer
  • 23. For the 16-bit binary number 1001 0101 1100 0011, show the effect of: a. A right shift of 4 bits with zero fill. b. A right
    13·2 answers
  • You write a short story, but you want to make sure your work is protected before you post it online. What should you do to help
    7·1 answer
  • How do you measure objects and re-size them in tinkercad? I need it in steps.
    7·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I question 3<br> need correct the answers to all
    12·1 answer
  • Program should allow for user to enter students name and his four test scores it should calculate and display the average and le
    7·1 answer
  • Because many mobile devices and personal computers today are continually connected to the Internet, securing those devices again
    6·1 answer
  • Your ___ can provide hardware firewall protection for your home network where it connects to the ISP's network, just as ISP netw
    12·1 answer
  • Danica is creating a flyer for her cookies that she will sell during her school fair. She wants to add a registered
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!