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
What is the decimal equivalent of (11000 + 10000)/101?
Arturiano [62]

its answer in binary is 1000 and in decimal is 8.

7 0
3 years ago
Getting access to web browsing software to install it on a computer or to update your existing software is called _________ .
Ivenika [448]

Answer:

Downloading and/or Burning it on to your computer

Hope this helped! if so please mark it as brainliest

Explanation:

8 0
2 years ago
Read 2 more answers
Assume the following variable definition appears in a program:
AnnZ [28]

Answer:

cout << setprecision(2)<< fixed << number;

Explanation:

The above statement returns 12.35 as output

Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.

The statement starts by setting precision to 2 using setprecision(2)

This is immediately followed by the fixed manipulator;

The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;

Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.

The fixed manipulator is then followed by the variable to be printed.

See code snippet below

<em>#include <iostream>  </em>

<em>#include <iomanip> </em>

<em>using namespace std;  </em>

<em>int main()  </em>

<em>{  </em>

<em> // Initializing the double value</em>

<em> double number = 12.3456;  </em>

<em> //Print  result</em>

<em> cout << setprecision(2)<< fixed << number;  </em>

<em> return 0;  </em>

<em>}  </em>

<em />

4 0
3 years ago
Select the correct category of cybersecurity described.
Shalnov [3]

Answer:

Network security

Explanation:

Network security is a category of cybersecurity that is related to the protection of the infrastructure of the computer network from unauthorized access and intrusion that may be from intended attack or from an expedient  program which may result in the modification, malfunctioning, misuse or unacceptable disclosure of the network and the contents of the network

The category of cybersecurity that 'prevents intruders from accessing, misusing, destroying, adapting, or improperly disclosing networks, network infrastructure, or the information contained within networks' is network security.

6 0
2 years ago
Travis completes his assignments on a word processor. He wants to make sure that his documents are free from spelling or grammat
mrs_skeptik [129]

Answer:

C:F7 I TAKE COMPUTER CLASAES

3 0
3 years ago
Read 2 more answers
Other questions:
  • Use the script below as a starting point to create a Rectangle class. Your rectangle class must have the following methods;A con
    12·1 answer
  • Header and footer elements such as worksheet name, current date, and time are _____ elements, they change as your worksheet does
    12·1 answer
  • You would like to create a graph that shows how much of your total investments are in stocks, savings, and mutual funds. You sho
    5·2 answers
  • Match the technology with the appropriate task.
    7·1 answer
  • Which one of these is correct PI of a XML document?
    13·1 answer
  • Listed items that are not in any particular order should be identified with
    8·1 answer
  • The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a
    11·1 answer
  • How does it transform your ways of socializing
    11·1 answer
  • The NVCC college professor receives frequent emails disguised as official business emails. They may be requests to reset a passw
    10·2 answers
  • This is a bit confusing to me. Could someone please help me! I have to use CSS to Design a Web Page. I will mark Brainliest!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!