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]
3 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]3 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
Anna wants to open the Run dialog box to run her program file. Which keys should she press to open the Run dialog box?
In-s [12.5K]
If Anna is using a Windows computer she should press the keys [Windows Flag] + [R] on her keyboard.
3 0
3 years ago
Manuel owns a small business. He needs to calculate the amount each employee owes in Federal taxes. Manuel should
liraira [26]
I think a database because if he’s calculating then he won’t need a printer or email
6 0
3 years ago
Read 2 more answers
Photoshop files are generally small in size. True or false
Alborosie

Answer:

true

Explanation:

I'm not really sure

4 0
3 years ago
Fill in the blank
EastWind [94]

Answer:

It is called the ENQUIRE database

Explanation: got it right boooiiiii

7 0
4 years ago
Read 2 more answers
a. Describe how the student can use the jar of rice to model particle motion of a substance in each state of matter: solid, liqu
Black_prince [1.1K]

Answer:

because the jar is ........

4 0
3 years ago
Other questions:
  • You can use ___________ to add dynamic features to a webpage such as search box that completes your search text automatically.
    12·1 answer
  • Create a structure named planet This structure will contain distance from Earth as an integer Atmosphere, language, people and p
    8·1 answer
  • If you want to present slides to fellow students or coworkers which productivity software should you use to create them A. Word
    14·2 answers
  • What are two reasons why tuples exist in Python?
    9·1 answer
  • Which graph is the solution to the system 2x – 3 and y &lt; 2x + 4?
    5·2 answers
  • In Python what are the values passed into functions as input called?
    13·1 answer
  • What is the orbit? Define
    12·1 answer
  • Stay safe and search answers up if you need ​
    14·1 answer
  • What are the specifications for a mine shaft headgear ​
    10·1 answer
  • THIS IS TIMED PLS HURRY UP
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!