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
Which devices typically generate computer output ?
Andrews [41]
Monitor , printer , speaker , projector , keyboard etc
6 0
3 years ago
Read 2 more answers
What is the mode of 18, 18, 15, 18, 18, 24, 21, 21, 24, and 14?<br> 18<br> 18.5<br> 21<br> 22.3
OLga [1]

Answer: 18

Explanation:

7 0
3 years ago
Which of the following is not an assessment of your fitness to drive
Ivan

Answer:

C. Am I carrying money?

Explanation:

The options are:

A. Am I awake and alert?

B. Am I emotionally sound?

C. Am I carrying money?

D. Am I physically able?

The correct option is certainly C. Am I carrying money? It can also be a concern if you are worrying since we don't have money. However, here its mentioned, we are not carrying, and it's not like we don't have money, and hence, it is not going to affect our mindset. Hence, it is not an assessment of anybody's fitness to drive.

3 0
3 years ago
Describe at least one reason why transitioning from the Cisco implementation of STP to the Cisco implementation of RSTP is seaml
kherson [118]

Answer:

STP mainly uses 5 states in a network, in which some states are replaced in RSTP which improves the time efficiency.

Explanation:

STP mainly uses five states i.e.  Learning, Listening, Blocking, Disabling and Forwarding to overcome the problem of collision in a network.  

RSTP replaced the three states of STP i.e listening, learning, and blocking by Discarding, which results in the time efficiency as compared to STP.  

As STP takes minutes to complete the network inter connectivity, RSTP completes it in seconds.

This is one of the main reason why an administrator want to change to RSTP.

6 0
3 years ago
Which option correctly identifies the expense that will cost you the most when you are living on your own?
larisa86 [58]
Cccccccccccccccccccccc
5 0
3 years ago
Other questions:
  • An icon in a document preset that looks like the play button on a YT video, what type of document is the preset meant to be used
    13·2 answers
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • I don't know the answer and I tried different ones and they not what the book is looking for.
    7·1 answer
  • You run the ipconfig command on your computer, and it reports an IP address of 169.254.75.10 on the Ethernet interface. Which de
    8·1 answer
  • What is the command to create a compressed archive(archive1.tar.gz) of files test1 test2and test3.
    5·1 answer
  • What is out put in a computer
    14·2 answers
  • How was the Big Ben project similar to the investigation you conducted in class to determine if the table was vibrating? How is
    7·1 answer
  • Join my FNAF fan club discord
    6·2 answers
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • Caps lock key is used to type alphabets. _________​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!