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
bonufazy [111]
3 years ago
13

Suppose you are provided with 2 strings to your program. Your task is to join the strings together so you get a single string wi

th a space between the 2 original strings. This is a common case is coding and you will need to create your output by joining the inputs and adding the space in the middle.
# Input from the command line
import sys
string1 = sys.argv[1]
string2 = sys.argv[2]
Computers and Technology
1 answer:
Mariulka [41]3 years ago
6 0

Answer:

public class TestImport{

   public static void main(String[] args) {

       String string1 = args[1];

       String string2 = args[2];

       System.out.println(string1 +" " +string2);

   }

}

Explanation:

The solution here is to use string concatenation as has been used in this statement System.out.println(string1 +" " +string2);

When this code is run from the command line and passed atleast three command line arguments for index 0,1,2 respectively, the print statment will return the second string (that is index1) and the third argument(that is index2) with a space in-between the two string.

You might be interested in
Consider an individual who wishes to ensure that their information remains secure and confidential, possibly to secure their per
EleoNora [17]

In terms of leaving evidence on the system,  their key concerns is their data protection and someone hacking into the system or reading their browsing history to use it against them.

<h3>What is system hack?</h3>

System hacking is a term that connote when a person or a computer user has a compromise between computer systems and software that tends to access the target computer and steal their information or others.

In terms of leaving evidence on the system,  their key concerns is their data protection and someone hacking into the system or reading their browsing history to use it against them as well as their privacy been exposed.

Learn more about system hack from

brainly.com/question/13068599

#SPJ1

7 0
2 years ago
Implement the function printTwoLargest that inputs an arbitrary number of positive numbers from the user. The input of numbers s
meriva

Answer:

The function in Python is as follows:

def printTwoLargest():

   chk = 0

   list1 = []

   num = int(input("Enter: "))

   while num > 0:

       for i in list1:

           if i == num:

               chk+=1

               break;

       if chk == 0:

           list1.append(num)

       chk = 0

       num = int(input("Enter: "))

   list1.sort()

   if len(list1) >= 2:

       print("Largest:", list1[-1])

       print("Second:", list1[-2])

   else:

       print("Length of list must be at least 2")

Explanation:

This defines the function

def printTwoLargest():

This initializes a check variable to 0

   chk = 0

This initializes an empty list

   list1 = []

This prompts the user for input

   num = int(input("Enter: "))

The following loop is repeated until input is 0 or negative

   while num > 0:

<em>The following for loop checks for duplicate</em>

<em>        for i in list1: </em>

<em>            if i == num: </em><em>If duplicate is found</em><em> </em>

<em>                chk+=1 </em><em>The check variable is set to 1</em><em> </em>

<em>                break; </em><em>And the for loop is exited</em><em> </em>

The input is appended to the list if the check variable is 0 (i.e. no duplicate)

<em>        if chk == 0: </em>

<em>            list1.append(num) </em>

This sets the check variable back to 0, for another input

       chk = 0

This prompts the user for another input

       num = int(input("Enter: "))

This sorts the list

   list1.sort()

This prints the two largest if valid user input is 2 or more

<em>    if len(list1) >= 2: </em>

<em>        print("Largest:", list1[-1]) </em>

<em>        print("Second:", list1[-2]) </em>

if otherwise, this prints that the length must be at least 2

<em>    else: </em>

<em>        print("Length of list must be at least 2")</em>

3 0
3 years ago
Ranges of IP address that anyone can use for their internal networks are known as ______.
Rama09 [41]
Since no answer choices, have to deduce it is Private Networks
8 0
3 years ago
Read 2 more answers
You open a folder Properties box to encrypt the folder, click Advanced, and discover that Encrypt contents to secure data is dim
yaroslaw [1]

Most likely a virus has attacked the system and is disabling encryption is the most likely problem.

c. Most likely a virus has attacked the system and is disabling encryption.

<u>Explanation:</u>

The end users can protect the folder by enabling encrypt the folder or files. But in windows encrypting the file or folder is not available. The computer management console is used to open all other services such as risk management, performance management extra.

In some other operating encryption of folder or files is allowed.  Third-party software is available to protect folder or files once the third party used any files possible to share outside the world.

As far as my knowledge there is encrypting technology is available in the windows operating system.

5 0
3 years ago
Write a function called st_dev. st_dev should have one
aleksandrvk [35]
Huluttttttt!!! greggyffh
8 0
2 years ago
Other questions:
  • Most OEMs recommend that the engine oil be replaced and a new filter installed at which of the following mileage intervals ?
    7·1 answer
  • In a PowerPoint presentation, it is not possible to add notes that are hidden from the audience's view.
    9·1 answer
  • Command icons under the following file tab in its function
    14·1 answer
  • Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. What critical detail must she ha
    14·2 answers
  • How to find determinant of ​
    15·1 answer
  • Which of the following things could you do in order to tell if a pair of colors has strong contrast? A. Look at the colors on th
    12·1 answer
  • Go in my discord server Code is . (CebjBXN)​
    10·2 answers
  • How to delete Brainly account ?​
    12·1 answer
  • Which two things can a user view in the Reading pane?
    6·2 answers
  • Type the correct answer in the box. Spell all words correctly. Which language should you use to add functionality to web pages?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!