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
Readme [11.4K]
3 years ago
13

We will pass in 2 values, X and Y. You should calculate XY XY and output only the final result. You will probably know that XY X

Y can be calculated as X times itself Y times. # Get X and Y from the command line:import sysX= int(sys.argv[1])Y= int(sys.argv[2])# Your code goes here
Computers and Technology
1 answer:
kiruha [24]3 years ago
5 0

Answer:

import sys

# The value of the second argument is assigned to X

x = int(sys.argv[1])

# The value of the third argument is assigned to Y

y = int(sys.argv[2])

# The result of multiplication of x and y is assigned to 'result'

result = x * y

#The value of the result is displayed to the user

print("The result of multiplying ", x, "and ", y, "is", result)

Explanation:

First we import sys which allow us to read the argument passed when running the program. The argument is number starting from index 0; the name of the python file been executed is sys.argv[0] which is the first argument. The second argument is sys.argv[1] and the third argument is sys.argv[2].

The attached file is named multplyxy (it wasn't  saved as py file because the platform doesn't recognise py file); we can execute it by running: python3 multiplyxy.py 10 23

where x will be 10 and y will be 23.

To run the attached file; it content must be saved as a py file: multiplyxy.py

Download pdf
You might be interested in
Unlike radio frequency identification (RFID) tags, bar codes: Question 30 options: require a reader that tunes into a specific f
iris [78.8K]

Answer:

require direct line-of-sight scanning.

Explanation:

Unlike radio frequency identification (RFID) tags, bar codes require direct line-of-sight scanning. Meaning you need a device that can scan the bar code and the scanner needs to be directly pointing at the barcode without anything in the way. This is because bar codes work by embedding the information in a design of lines that need to be scanned to retrieve the information. If anything gets in the way it interrupts the scanning process and the data is not correctly transmitted. RFID tags on the other hand do not need a direct line of sight since the information is transferred through radiofrequency. This allows the data to be transferred without a line of sight and at a distance of up to 300ft.

8 0
3 years ago
What are some facts about webmasters?
FromTheMoon [43]
Webmasters monitor  the server to be sure  it is  running,Some webmasters decide what kind of  computer will hold a websites information ,Some webmasters abuse other sites by exploiting their comment fields.
4 0
3 years ago
Suppose that each country completely specializes in the production of the good in which it has a comparative advantage, producin
djverab [1.8K]

Answer:

In  this case, the country that produces rye will produce 24 million bushels per week, and the country that produces jeans will produce 64  million pairs per week.

Explanation:

Total labor hour = 4 million hour

Number of bushes produce in 1 hour = 6

⇒total bushes produce = 6*4 = 24 million

∴ we get

The country that produces rye will produce 24 million bushels per week

Now,

Total labor hour = 4 million hour

Number of pairs produce in 1 hour = 16

⇒total bushes produce = 16*4 = 64 million

∴ we get

The country that produces jeans will produce 64  million pairs per week.

5 0
3 years ago
Which of these is not a combination of a keyboard and percussion musical instrument?
Sergio [31]

Answer:

The Harmonium is not a combination of a key board and percussion musical instrument.

Explanation:

The Harmonium is not a combination of a key board and percussion musical instrument.

A harmonium, also called a "melodeon", "reed organ" or "pump organ", is a keyboard instrument that is a lot like an organ. It makes sound by blowing air through reeds, which are tuned to different pitches to make musical notes.

3 0
3 years ago
Levi's an experienced marketing strategist for a software company that sells a learning platform to public schools. He developed
koban [17]

Answer:

B. He segments data using his company’s CRM dashboards, giving his organization access to data that powers their decision-making.

E. He encourages learning from failure, which is necessary for testing the possibilities and for learning what does not work.

Explanation:

He seems to have realized that learning from mistake is important, and that can be done through the research of the company's past. Also, he has also learnt to analyze the data as well, as he is able to constantly evolve company.s marketing strategies to fit to school's training needs. And this is impossible without analysis and research. It also looks like that he is a good learner, and loves exploring new things. And he must be using analytic software like Tableau OR Power BI, and he might be using Machine learning as well, and definitely the latest. And he is definitely a good manager.

And since its management level, B is definitely correct as it is reliable, and other options are not reliable.

6 0
3 years ago
Other questions:
  • Which network type connects each computer and device to a central device?
    5·1 answer
  • nswer the following questions concerning chapter 1:1.1 Which pair of layers are NOT peer layers?a.Transport layer in the sender
    9·1 answer
  • How does the teacher know you have completed your assignment in Google Classroom?
    12·1 answer
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • The physical elements needed for the production of digital media, such as computers, servers, and so on are called the {Blank}
    8·1 answer
  • What is emerging as a major business area of innovation that offers a flexible collection of computers on the internet that can
    6·1 answer
  • This is for being Weird!
    15·2 answers
  • A disk drive has 2000 cylinders, numbered 0 to 1999. The drive is currently servicing a request at cylinder 783, with the previo
    6·1 answer
  • Hello guys please help me <br>list and identify the components of computer ​
    15·1 answer
  • T/F static development is the process of constructing the programs and code modules that serve as the building blocks of the inf
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!