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
write a program that converts a Fahrenheit temperature to Celsius. The design of this program is important as I want you to brea
slamgirl [31]

Answer:

See the code snippet in the explanation section

Explanation:

import java.util.Scanner;

public class Question {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.println("Enter temperature in Fahrenheit: ");

   int inputTemperature = scan.nextInt();

   fahrenheitTemperatureToCelsius(inputTemperature);

 }

public static void fahrenheitTemperatureToCelsius(int fahrenheitTemperature){

   int celsiusTemperature = ((fahrenheitTemperature - 32)*5)/9;

   System.out.println("Temperature in Celsius = " + temperature);

}

}

5 0
4 years ago
What are the common camera hazards? When might you encounter these hazards in your life, and what do you plan to
jok3333 [9.3K]

Answer:

Common Camera hazards are dust, sand, non-microfiber cloths, oil, water, shocks, and blunt force. In order to avoid them, be sure to use lens covers, microfiber cloths, camera cases, camera jackets (can be improvised using a towel), and keep the neck strap on your neck.

4 0
3 years ago
Which of the following is a true statement about parameters in data management? Check all that apply.
lora16 [44]

Answer:

Parameters are used to limit or refine results.

A multiply parameter contains more than one condition to locate, sort, or filter data.

Searching for the number 12 in your spreadsheet is an example of a simple parameter.

Explanation:

5 0
3 years ago
What does it mean to calculate frequencies within a dataset
Vadim26 [7]
To count the number of times a dataset is used by a student 
<span>to calculate the product of two variables to make a third variable </span>
<span>to count the number of cases that fall into different subgroups within a dataset </span>
<span>to calculate the sum of a column of variables in a dataset </span>
7 0
3 years ago
Read 2 more answers
What would a world where we have 2^128 (340 undecillion) Internet connected devices look like? How could that much Internet usag
cluponka [151]

A world  have 2^128 (340 undecillion) of IPv addresses that helps to connect to the internet. IPv6 addresses can make it easier for working organizational teams connecting to the Internet, IP addresses that are created by IPv6 are 128 bits.

<h3>What is internet?</h3>

Internet is the system  uses the Internet protocol suite (TCP/IP)  and interconnected computer networks that communicate between two or more individuals.

Today, almost 20 IP addresses are taken by7 each home for each electronic device. The internet usage is so wide, that even a simple task  is not possible without it. Even a simple task can be done using internet.

Learn more about internet.

brainly.com/question/13308791

#SPJ1

5 0
2 years ago
Other questions:
  • Which of the following refers to applications and technologies that are used to gather, provide access to, and analyze data and
    8·2 answers
  • What is the part of the computer system that receives inputs, directs those inputs to the processor, and redirects the processed
    14·1 answer
  • The network of satellites monitoring continental movement is referred to as
    7·1 answer
  • What Is The Oldest Known Analog Computer In The World?
    14·1 answer
  • Which describes a design theme in PowerPoint? a set of elements that unify the slides and complement the topic a printed handout
    11·2 answers
  • True / False You should always consider your business requirements before deciding which designs are best for your environment.
    13·1 answer
  • Why does my inbox keep getting notifications and then disappearing?
    15·2 answers
  • Mencione algunos ejemplos en donde sean utilizadas las máquinas de aire comprimido. Justifique su respuesta.
    7·1 answer
  • *
    6·2 answers
  • In cell J6, insert a formula using the OR function that returns TRUE if the rating (cell 16) equals "A" or the email reminder (c
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!