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
How should students approach the decision to take the SAT or the ACT?
Vikentia [17]

Answer:

I believe that the only way to really make an informed decision as to which test is a better fit for you is to take a full-length diagnostic exam for both the ACT and the SAT before doing any prep. I also would look at the pros and cons for each test.

I personally took the ACT because there is <em>NO PENALTY </em>for guessing on the test. An educated guess won't hurt your score on the ACT.

6 0
3 years ago
___signs tell you what you can or can't do, and what you must do ?
Harrizon [31]

Answer:

Warning signs tell you can or can't do, and what you must do?

5 0
3 years ago
Read 2 more answers
Need the answer ASAP!!!!!!!!!!!!! I’ll mark brainliest if correct
Dmitriy789 [7]

Answer: review; quality

Explanation:

SQA refers to the ongoing process that can be found in the Software Development Life Cycle whereby the developed software is checked in order to ensure that the desired quality measures are met. The SQA processes is vital as it checks for the quality in every development phase.

The first step of the SQA process is to (review) the software development process. The next step is to set (quality) attributes.

6 0
3 years ago
Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the fo
zavuch27 [327]

Answer:

D) extents

Explanation:

Disks fragmentations in computer science refers to the cases of a file system laying out its contents  in a non-continuous manner thus preventing an in-place alteration of the contents (that is the contents of the file are scattered in fragments across different location on the disk). Disk fragmentation is mostly associated with aging. To mitigate against this, modern implementation of file systems try to preallocate longer chunks of disk space, this is called extents, in this way fragmentation is avoided since a contiguous size of disk space is preallocated to the files and its contents stay together.

4 0
3 years ago
Danny is editing the text content of a single page on a website he created a year ago. What part of the tag would he have to upd
Verdich [7]
<h2>"<lastmod>" is the right choice for the given scenario</h2>

Explanation:

<update> This tag does not belong to <URL> tag of the site map. Hence this option goes invalid.

<lastmod> This gives details of the date and time when the website content was changed. It will be in "W3C Date time format". This may omit time at times. This is the write answer.

<loc> This contains the URL of the web page.

<changefreq>: How frequently the "web page is likely to get modified". The  values which it accepts are: "monthly, always , daily , weekly ,hourly, yearly , never"

5 0
3 years ago
Other questions:
  • In the spreadsheet example shown in chapter 5 ____ run from top bottom and are designated by a letter?
    12·2 answers
  • When you use a script to create all of the tables for a database, you must start with the tables that don't have _______________
    15·1 answer
  • Can somebody help me?
    11·1 answer
  • Text that does not fit in a cell
    7·1 answer
  • Consider two communication technologies that use the same bandwidth, but Technology B has twice the SNR of technology A. If tech
    14·1 answer
  • A single-user/single-tasking operating system allows only one user to perform one task at a time. A real-time operating system g
    13·1 answer
  • Keli is unable to find a shape that meets her needs. Which feature in Power Point should she use to create shapes that are compl
    6·1 answer
  • Choose all that apply.
    5·2 answers
  • Set of general format used to write program in any programming language?​
    10·1 answer
  • How do I fix when it hits the second session it skips scanf.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!