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
Jement Tools
Yuki888 [10]

Explanation:

I think it's either c or d but I don't remember

7 0
2 years ago
Write a program that reads a list of integers, one per line, until an * is read, then outputs those integers in reverse. For sim
TiliK225 [7]

Answer:

I'm just going to copy my pseudocode into an answer:

x = array()

i = 0

while (true)

j = input()

if j = "*" then break

x[i] = j

i++

print x.join(", ")

Explanation:

8 0
2 years ago
What is the protocol used for the majority of network/internet traffic?
mash [69]
This is rather ambiguous, but in this day an age, it has to be the "internet protocol" (IP). 
7 0
3 years ago
What solicits online input such as product ratings from consumers?
Pie

Answer:

Crowdsourcing I think is the correct answer. "A quick response code" and "Computer Forensics" both don't make sense as answers, and Crowdfunding is specifically for money.

7 0
2 years ago
Plz help need answers!???idk if u can zoom
yKpoI14uk [10]
1-plain text
2-hypertext
3-none of the above
4-none
5-confidentiality
6-private key
7-delivery receipt
8-delay
9-to do
10-permission
11-categories
12-complete
13-responses
14-signature
15-theme

man , that was crazy homework , not that much here in UK
3 0
2 years ago
Other questions:
  • The angles of a quadrilateral are in the ratio 1:2:3:4 what is the largest angle​
    5·1 answer
  • Write a method so that the main() code below can be replaced by the simpler code that calls method mphandminutestomiles(). origi
    14·2 answers
  • True or false that computers that are joined together are able to share hardware and software, but not data
    11·1 answer
  • A 4-bit left shift register is initially in the 0000 state, with all the flip flops storing 0s. A group of bits 1011 is serially
    5·1 answer
  • You are given the task of reading in n numbers and then printing them out in sorted order. Suppose you have access to a balanced
    12·1 answer
  • What is the turns ratio of the transformer T10261
    5·1 answer
  • Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two numb
    8·1 answer
  • You want to calculate a bonus if the sold price was at least equal to the listing price, and if the house sold within 30 days af
    6·1 answer
  • Can someone help me?
    10·1 answer
  • Question #3
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!