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 default setting for a secondary zone's refresh interval is how many minutes
Vinil7 [7]
The default value at which a refresh interval (an interval a sec. server check for zone updates) is 15 minutes.
If this value is increased, the network traffic is reduced. In the eventuality that the refresh interval expires, the secondary zone will contact the primary zone and request it to initiate the zone transfer.
4 0
3 years ago
What does limited access to a document mean?
Licemer1 [7]
The second last one is the answer i think
7 0
3 years ago
Read 2 more answers
If I have 103.5% in my grade and if I got a 0/100 on a test, what do I have now in my grade?
kirill115 [55]
It might be an 81 because if you fail 0/100 yo grade is going DOWN
3 0
3 years ago
Read 2 more answers
Our new catalog contains an eclectic collection of items
Cloud [144]

Answer: .

Explanation: .

7 0
3 years ago
When do you use a for loop instead of a while loop?
creativ13 [48]

Answer:

i dont know.prob guess a short loop.

Explanation:

8 0
3 years ago
Other questions:
  • Describe network in terms of the class computer lab
    14·1 answer
  • What does enterprise operating system mean?
    13·1 answer
  • To read visual and audio text means
    11·1 answer
  • Help please fast
    6·2 answers
  • (5 points) Create a user-defined data structure (i.e., struct) called Point that represents a two-dimensional Cartesian coordina
    5·1 answer
  • What 2 important components are found on a motherboard? (2 points each)
    13·1 answer
  • ___ design uses the same webpage content, but applies styling depending on the viewport size of the device
    11·1 answer
  • Example of Not a computer characteristics example
    12·1 answer
  • Which is the first calculating device invented?​
    14·2 answers
  • How can you protect your information when using wireless technology
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!