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
Horses developed longer legs over time in response to pressure from predators that they needed to outrun to survive.
sergejj [24]
This is true. Horses did develop that
7 0
3 years ago
Ok for whoever answers this, Ill wager 20 points...
Novosadov [1.4K]

Answer:

The display will be 17.

Explanation:

Tracing through the program:

At first, math is called and sent 1 and 2 - so 1 is stored to ans1 and 2 is stored to ans2.

If the user inputs 3 for a and 4 for b, the program then calls function math2 and passed values of 3 and 4.

So now inside of math2, 3 is stored to res1 and 4 is stored to res3. Inside of this function, res1 and res2 are added together - so then 7 is stored to d and then returned back to the original function.

So now 7 was stored back to the variable c. Then a and ans1 are added together (3 + 1 = 4) and b and ans2 are added together (4 + 2 = 6). Each of these values are stored back to e and f.

Then those values, e and f (4 and 6) are again sent to math2, which simply adds the values together and returns it back to the function. So 10 is sent back to math and stored to the value of g.

Then c (7) and g (10) are added together and displayed.

8 0
3 years ago
Read 2 more answers
Who here would like to play among us with me? <br> Time: Friday, November 13
Ira Lisetskai [31]

Answer:

BRO I WANNA!

My among us name is "A cop"

What time?

Explanation:

8 0
3 years ago
A set of object that share a common structure and common behavior in database is called ​
Tcecarenko [31]
An Object Class. Hopefully this answer is right.
3 0
3 years ago
Your company is experiencing an increase in malware incidents. Your manager is asking for advice on how best to verify that comp
zepelin [54]

Answer:

Option C.

Explanation:

The company is witnessing a spike in incidents involving malware. The boss is looking for advice on the best way to check that corporate-owned desktops are up-to-date regarding security updates, anti-malware standards and software or application updates. The boss is also worried that somehow the staff-owned gadgets that link to the corporate Local area network use the same level of protection as the devices in the corporation.

So, the user implements security and resources from endpoint management system appliance.

7 0
3 years ago
Other questions:
  • A. STOP: What is a technology habit you practice today that you now realize will not help you to be successful? Explain why it’s
    10·2 answers
  • Which of the following would be a show stopper for the development of an enterprise mobile app? The app demands data throughput
    11·1 answer
  • An application calculates an ending inventory amount based on a beginning inventory amount, sales, and returns. You need to crea
    8·1 answer
  • Student aid is based on either financial need or _____ need.
    12·2 answers
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • Dani wants to create a web page to document her travel adventures. Which coding language should she use?
    11·2 answers
  • JAVA
    10·1 answer
  • In excel online what is it called when you join connecting cells together to span across more than one column and/or row?
    7·2 answers
  • Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
    15·1 answer
  • The ______________<br> holds data only while the computer is on.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!