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
Moore's law benefits
ss7ja [257]

Answer:

performance -processor speeds increases because the smaller the transistor, the faster it can operate. Additionally, the transistors become closer to each other which reduces the latency between them.

2.Complexity-for a  given size the number of transistors doubles with the reduction in feature size

Explanation:

3 0
2 years ago
I. A teacher can prepare a slide and demonstrate it in the class with the help
marin [14]

Answer:

ay di ko alam yan hahahaha

3 0
2 years ago
When trying to remember a list of words, a person may choose a word to which they "hang" their memories on. This type of mnemoni
nika2105 [10]

Answer:

Peg

Explanation:

This is known as the "peg technique." The name comes from the fact that we usually employ pegs to hang clothes to dry. In this memory aid, the person who wants to memorize something creates mental associations between two concrete objects. This is done in a one-to-one fashion that links all the words together.

6 0
3 years ago
Which all frameworks are developed using Scala
Alexandra [31]

Akka. Speaking of high concurrency tools written in Scala, Akka is an extremely fast, extremely concurrent framework for building distributed applications. ... Similar to Finagle, Akka is written in Scala and provides both Scala and Java APIs.

8 0
3 years ago
You can access various sites on the WWW by using hyperlinks or by
Vilka [71]
<span>or by following directions on screen </span>
5 0
3 years ago
Other questions:
  • What type of Windows Server is the most likely server to be targeted by a computer hacker?
    13·2 answers
  • Prevent a page break in the final paragraph of this document by keeping the lines together
    10·1 answer
  • A circuit contains three resistors connected in series. the value of r1 is 150 , the value of r2 is 60 , and the value of r3 is
    8·2 answers
  • ________ is a dedicated device designed to manage encrypted connections established over an untrusted network such as the Intern
    12·1 answer
  • What command can be used to export an nps backup file named npsconfig.xml that can be used to restore nps configuration on anoth
    12·1 answer
  • Which of the actions below will not create more room on your hard drive?
    11·1 answer
  • As it turns out, the scale of this chart is higher than all of these; it’s “exponential.” What does this imply for the difficult
    8·1 answer
  • Why is the Vietnam War referred to as The Living Room War
    15·1 answer
  • Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If th
    5·1 answer
  • Sonora wants to extend the cells to be added in her formula. What is the quickest way to add more cells?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!