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
Can I have some help?
Ad libitum [116K]
I believe its A as the image provided says plain message
6 0
2 years ago
Sincerely is an example of a salutation true or false
Setler79 [48]
No, I don't think so.
5 0
3 years ago
Read 2 more answers
Why is there more than one Brainly website?
marta [7]

they are for different countries and languages

8 0
2 years ago
Read 2 more answers
Which command should you use to display both listening and non-listening sockets on your linux system? (tip: enter the command a
trasher [3.6K]

Answer: netstat -a

Explanation: The netstat -a command displays both listening and non-listening sockets.

3 0
2 years ago
A security risk to email is​ __________, which are fraudulent messages that prompt unwary users to reveal sensitive information
d1i1m1o1n [39]

Answer:

Option C is the correct answer for the above question.

Explanation:

Pishing is a type of attack which is used by the attacker to access the secured information from the system. It is used by the third person assuming for the system that he is the right use of the system and can access the information of the system.

The above question asked about the attack which can access the information to assume that he is the right user and give accessed to the network to been hacked. So the answer is phishing which is described above. Hence option C is the correct while the other is not because:-

  • Option A states about direct mail which is not a type of attack.
  • Option B states about instant messaging which is also not a type of attack.
  • Option D states about spam which is used to send the spam messages.
  • Option 'E' states about the mass mail which is used to send the lots of spam mail.
5 0
2 years ago
Other questions:
  • Please draw a diagram of a complete graph with 5 vertices (K5), its adjacency matrix and adjacency list representations.
    5·1 answer
  • Pinterest, a visual bookmarking Website, logs more than 14 terabytes of new data each day, which means its storage needs are con
    10·1 answer
  • An algorithm written out in plain English statements is called __________.
    8·1 answer
  • What is "the last mile of broadband access"? Why is this a problem and what kind of impact does it have on the business world an
    9·1 answer
  • In the context of applications of artificial intelligence (AI), _____ perform well at simple, repetitive tasks and can be used t
    11·1 answer
  • Micheal is the project manager in a company. He wants his organization to use technology for higher revenue and productivity. Wh
    13·1 answer
  • Another word for asking a question of your data is to _____ it.
    6·1 answer
  • Which network device sends data to every device that is connected to it?.
    7·1 answer
  • Think about all the different ways you communicate with other people throughout your day. • What makes this communication succes
    15·1 answer
  • How do I find unwanted programs on my computer?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!