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
bixtya [17]
3 years ago
10

Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?

Computers and Technology
1 answer:
Hunter-Best [27]3 years ago
7 0

Answer:

C

Explanation:

C.argv[0]: "program.py"

argv[1]: "-r"

argv[2]: "input.dat"

argv[3]: "output.dat"

is the right answer. as 0 argument is always the script. We can find this by importing sys and using the command sys.argv. And like len(sys.argv) will give total number of arguments.  

You might be interested in
Jeremy is designing a website for a florist. He intends to discuss the web design with his client. Which tool should Jeremy use
stiv31 [10]

Answer:

C.  layout of each page with its respective elements

Explanation:

A layout  of each page with its respective elements will give the client a good idea of the final product and help him confirm his desires/requests towards the creation of the Web site.  Most people are visual, especially about things they don't fully understand, so a clear and visual representation is best.

<u>A. Bulleted lists and titles</u>... won't give the idea of the full layout of the Web site.

<u>B. chart depicting</u>....  that's more a tool for the programmer than the client, although user flow is important, it isn't as much as the visual aspect of each page.

<u>D. pictures and screenshots of websites of other florists..</u>. That could be a useful aid on the first contact, but the question implied the Web site is already in progress... so that wouldn't help much.

<u>E.  programming code for the website</u>, absolutely not, the client hired Jeremy not to have to deal with that.

5 0
3 years ago
Create an absolute value component abs() with an 8-bit input A that is a signed binary number, and an 8-bit output Q that is uns
Stolb23 [73]

Answer:

Explanation:

Find attached the solution

5 0
3 years ago
Pls help me computer science discoveries
lara31 [8.8K]

Answer:

jdinwoahdjsioadjsakodsiaohdeioajfnsohfujkdshksyfneowjdfikdjiadjsadhnsuidghaiudbnha

Explanation:

3 0
2 years ago
Write a short paragraph explaining why cross-training employees is imperative.
harina [27]
<span>One of the main deterrents to cross-training is how employees feel about retaining knowledge. An employee may feel their job is threatened if someone else is being trained in their function. It's important that you lay these woes to rest and explain why you are cross-training your employees.</span>
4 0
3 years ago
Create a method called nicknames that passes an array as a parameter. Inside the method initialize it to hold 5 names of your ch
Gre4nikov [31]
<h2>Answer:</h2>

    //======METHOD DECLARATION=========//          

    //method name: nicknames                                          

    //method return type: void                                            

    //method parameter: an array reference                    

    public static void nicknames(String [] names){      

       //initialize the array with 5 random names              

       names = new String[] {"John", "Doe", "Brian", "Loveth", "Chris"};

       //using an enhanced for loop, print out the elements in the array

       for(String n: names){

           System.out.print(n + " ");

       }

       

    }

<h2>Explanation:</h2>

The program is written in Java. It contains comments explaining important parts of the code. Kindly go through these comments.

A few things to note.

i. Since the method does not return any value, its return type is <em>void</em>

ii. The method is made public so that it can be accessible anywhere in and out of the class the uses it.

iii. The method is made static since it will most probably be called in the static main method (at least for testing in this case)

iv. The method receives an array of type <em>String </em>as parameter since the names to be stored are of type <em>String</em>.

v. The format of initializing an array manually should follow as shown on line 7. The <em>new</em> keyword followed by the array type (String), followed by the square brackets ([]) are all important.

vi. An enhanced for loop (lines 9 - 11) is a shorthand way of writing a for loop. The format is as follows;

=> The keyword <em>for</em>

=> followed by an opening parenthesis

=> followed by the type of each of the elements in the array. Type String in this case.

=> followed by a variable name. This holds an element per cycle of the loop.

=> followed by a column

=> followed by the array

=> followed by the closing parenthesis.

=> followed by a pair of curly parentheses serving as a block containing the  code to be executed in every cycle of the loop. In this case, the array elements, each held in turn by variable n, will be printed followed by a space.

A complete code and sample output for testing purposes are shown as follows:

==================================================

public class Tester{

    //The main method

    public static void main(String []args){

       

       String [] names = new String[5];

       nicknames(names);

    }

   

  //The nicknames method

    public static void nicknames(String [] names){

       names = new String[] {"John", "Doe", "Brian", "Loveth", "Chris"};

       for(String n: names){

           System.out.print(n + " ");

       }

       

    }

}

==================================================

<h2>Output:</h2>

John Doe Brian Loveth Chris

<em>NB: To run this program, copy the complete code, paste in an IDE or editor and save as Tester.java</em>

6 0
2 years ago
Other questions:
  • In Java :
    11·1 answer
  • About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
    12·1 answer
  • Jeremy wants to run a program file from the command prompt. Which of the following should Jeremy type in the command prompt wind
    8·2 answers
  • Repl.it Assignment 4.1.2 (Guess the Number)<br> Please help me<br> I will give brainliest and a like
    10·1 answer
  • A debugging process where you, the programmer, pretend you are a computer and step through each statement while recording the va
    11·1 answer
  • My sister put my phone in the microwave and I'm pretty sure the battery blew up. I'm too scared to open the microwave. What do I
    11·1 answer
  • Which company provides a crowdsourcing platform for corporate research and development?
    9·1 answer
  • Give one (1) advantage and one(1) disadvantage of using and integrated software package over a custom written one.
    15·1 answer
  • Blockquote
    11·1 answer
  • Jeroo Bob has just awoken from a long night's sleep and is hungry for some winsum flowers. He walks out of
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!