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
GREYUIT [131]
3 years ago
12

Get two positive integers from the user. Write code to multiply the two numbers together using only addition or subtraction. You

should not use the '*' operator. Remember that x*y is simply x+x+x+...+x, y times. You may use eitnher a for loop or a while loop
Computers and Technology
1 answer:
padilas [110]3 years ago
8 0

Answer:

number1 = int(input("Enter the first number: "))

number2 = int(input("Enter the second number: "))

result = 0

for i in range(number1):

   result += number2

print(str(result))

Explanation:

Ask the user for two numbers

Initialize result as 0 to hold the multiplication of the numbers

Create a for loop that iterates "number1" times. In each iteration, add number2 to the result.

When the loop is done, print the result

You might be interested in
I have tried many times to find a gaming setup for $4k. I have tried many websites but they are not working for my liking. Any o
Vikentia [17]
I would try going to pcpartpicker.com and build your pc from there, and after you’ve done that take your remaining budget to find whatever else you need for your setup
8 0
2 years ago
Not a subject question but please help
Doss [256]

Answer:

You go to account settings, edit your profile and click preferences and then go to choose level and put which grade u are in the options r middle school, high school, and college

Explanation:

8 0
3 years ago
Read 2 more answers
P16 Consider the following network. ISP B provides national backbone service to regional ISP A. ISP C provides national backbone
Art [367]

Solution :

Considering the following data :

$\text{ISP B}$ provides the national backbone to the regional $\text{ISP A}$.

$\text{ISP C}$ provides the national backbone to the regional $\text{ISP D}$.

Each of the ISP consists of one autonomous systems (AS).

$\text{ISP B}$ would like to hand over the traffic of C through the $\text{West}$ Coast.

The $\text{ISP C}$ would like to receive traffic from B's peering point via East Coast.

One way for $C$ to force $B$ to hand over all of $B$’s traffic to $D$ on the east coast is for $C$ to  only advertise its route to $D$ via its east coast peering point with $C$.

7 0
3 years ago
What is the difference between paper size and page margins in word
yKpoI14uk [10]
Paper size is how big or small the paper is whilst paper margin is the staight lines or shapes at the sides of a page or sheet.
6 0
3 years ago
Read 2 more answers
In windows 10, what is the name of a program you can use to find a file or folder?
Anna007 [38]

Answer:

windows search explorer

3 0
3 years ago
Other questions:
  • What is the other name of the horizontal column graph?
    6·2 answers
  • Why do objects in the back seat move when the car turns
    11·1 answer
  • Iven the code fragment below with nested if statements, rewrite the code to combine all the tests into one if statement with mul
    7·2 answers
  • Harry Potter and his friends are at Ollivander's with Ron, finally replacing Charlie's old broken wand. Hermione decides the bes
    11·1 answer
  • How long does it take to be placed in a class on flvs?
    14·1 answer
  • Why are ethics important in PR?
    8·1 answer
  • Which of these is NOT a standard part of the outro of a podcast?
    15·1 answer
  • With
    10·2 answers
  • Which type of shape allows you to add text that can be moved around.
    11·1 answer
  • Which type of GUI control would be best to use if you wanted the user to select one date from a list of three possible dates to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!