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
Shtirlitz [24]
2 years ago
5

Write a function longer_string() with two string input parameters that returns the string that has more characters in it. If the

strings are the same size, return the string that occurs later according to the dictionary order. Use the function in a program that takes two string inputs, and outputs the string that is longer.
Computers and Technology
1 answer:
BartSMP [9]2 years ago
4 0

Answer:

Here you go :)

Explanation:

Change this to your liking:

def longer_string(s1, s2):

   if len(s1) > len(s2):

       return s1

   elif len(s1) < len(s2):

       return s2

   else:

       return s2

x = input("Enter string 1: ")

y = input("Enter string 2: ")

print(longer_string(x, y))

You might be interested in
How to be fluent in computer
Setler79 [48]

Explanation:

1. Seeing people do technological innovations, so you have some motivation and inspiration to be fluent in computer

2. Try experimenting and trying stuff, like trying to learn how to code, how the internet work, etc.

3. work more with computers, for example, make a note with OneNote, making digital art with blender, adobe illustrator etc.

4. Try to learn how to be better at learning computer, like, if you do mistakes in your learning journey, try to avoid it next time

5. good luck ;)

7 0
2 years ago
Read 2 more answers
. How to insert Section Break in Microsoft word 2016 ?
aivan3 [116]

Answer:

C. Layout Tab – Page setup group – Breaks – Next page button.

3 0
3 years ago
What is the big-O performance estimate of the following function?
larisa [96]

Answer:

The time complexity of the code is O(log₇n).

Explanation:

The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to  be log base 7.

When we divide the input by 2 the time complexity is log base 2.

So on dividing it by 7 we get the time complexity of log base 7.

8 0
3 years ago
Read 2 more answers
Is there any website online to use android studio live?​
slavikrds [6]

Answer:

May bhe here

https://developer.android.com/studio/intro

Explanation:

5 0
3 years ago
: Each individual data items of record is called a
musickatia [10]
Each individual data items of record is called field (letter A).
The client may communicate with Proxy server to use a protocol to proxy the communication between the client and the DBMS. Proxy servers lets you hide your real Ip address and replaces it with a new IP obtained from proxy server sites.

6 0
3 years ago
Other questions:
  • The code selection above is taken from the Color Sleuth activity you just completed. This selection would count as an abstractio
    12·1 answer
  • You want to place a video from the internet to your desktop. what process do you use?
    15·1 answer
  • When adding a background to a Web page, it can be _____. a. a solid color b. a fill effect c. an image d. all of the above
    12·1 answer
  • . Which of the following is NOT an option for increasinghard drive storage space?
    6·1 answer
  • I know how to design it but I’m confused as to how to write a function code based on the info provided.
    10·1 answer
  • Both the Alphabetic Index and the Tabular List must be used to locate and assign a diagnosis code in ICD-10-CM. Group of answer
    7·1 answer
  • Which type of CPU instruction performs arithmetic calculations and stores the results in memory?
    14·2 answers
  • In the context of intentional computer and network threats a ____ is a programming routine built into a system by its designer
    14·2 answers
  • When you add encryption to a powerpoint presentation what does it do
    14·1 answer
  • marion is an iot developer working for a large organization. why does his supervisor want him to stay informed about the network
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!