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
AleksAgata [21]
3 years ago
12

Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the f

irst string is less than, equal to, or greater than the second string7. Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the first string is less than, equal to, or greater than the second string
Computers and Technology
1 answer:
Andru [333]3 years ago
3 0

user_str1 = str ( input ("Please enter a phrase: "))

user_str2 = str ( input("Please enter a second phrase: "))

def strcmp (word):

user_in1 = int (len(user_str1))

user_in2 = int (len(user_str2))

if user_in1 > user_in2:

return "Your first phrase is longer"

elif user_in1 < user_in2:

return "Your second phrase is longer"

else:

return "Your phrases are of equal length"

You might be interested in
The Department of Homeland Security only deals with threats to national security and does not play a role in helping companies m
adoni [48]

Answer:

False

Explanation:

The Department of Homeland Security (DHS) plays vital role to secure country from many types of threats. One of the Operational and Support Components of DHS is Cybersecurity and Infrastructure Security Agency (CISA).

CISA plays the leading role to protect IT infrastructure from cybersecurity threats of today. It works with partners from all levels of government and private sectors to meet the challenges of cybersecurity.

3 0
3 years ago
Which of the following is a strategy used to enhance communication in a presentation?
Ann [662]
I believe the answer could be A
7 0
3 years ago
Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you:
postnew [5]

Answer:

Will the printer work when I connect the printer's USB cable into a USB 2.0 port on my computer:

b. Yes, but at the USB 2.0 speed.

Explanation:

  • The option a is not correct as we can use 2.0 port also for this purpose but not only 3.0.
  • The option b is correct as we can use 2.0 USB Port for 3.0 USB but the speed will remain that of 2.0 USB.
  • The option c is incorrect as  because the speed is dependent on the speed of port.
  • The option d is incorrect as because USB can have speed of 2.0 or 3.0 depending upon the port and USB but can't have 1.1 speed.
8 0
3 years ago
Read 2 more answers
Nathan wants to create multiple worksheet containing common formatting styles for his team members. Which file extension helps h
Gnoma [55]
Templates help Nathan to create multiple worksheets with common styles. He needs to save them with the xls extension.
6 0
4 years ago
PLZ HELP WITH SPEED i need the answer<br><br> WILL GIVE BRAINLIEST
jeka57 [31]

Explanation:

1. register-true

2. line spacing

3. before text

4. first line

8 0
3 years ago
Other questions:
  • An independent frame that holds a program, document, or folder contents in windows 7 is called a ____.
    11·1 answer
  • C++
    8·1 answer
  • What is the output of executing the code segment?
    7·1 answer
  • One way to prepare for filing the PROFILE is to:
    12·2 answers
  • Which area of study involves microeconomWhich area of study involves microeconomics? A. a nation's ability to meet consumer dema
    10·1 answer
  • "Why learning how to type is so important.
    7·1 answer
  • What is the output of the following code<br> X = 06<br> y = 0<br> print (x ** y)
    12·1 answer
  • What do you call the processing of converting an image to binary?
    7·2 answers
  • Older systems that often contain data of poor quality are called ________ systems.
    12·1 answer
  • If you use your computer primarily for telnet into a remote computer, will you have a large long distance telephone bill?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!