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
What is the left are if a slide in a presentation called
defon

Answer:

A slide pane

Explanation:

a feature available in some programs, usually found on the left side of the window.

8 0
3 years ago
Quick question if anyone knows? How do you give brainlist? Please tell me if you know! ( Here if a chiaki gif for your too lol )
riadik2000 [5.3K]

Answer:

To give brainliest you need to click the little crown under the answer that someone has responded with! it should be located near the rate 5 stars!

Explanation:

hopefully this helps!! also yes yes ty for the gif<3

7 0
2 years ago
A. Calculate the diffusion coefficient for magnesium in aluminum at 450°C.
SIZIF [17.4K]

Answer:

a) D = 4.88 * 10^(-14) m^2 / s

b)   <em>t </em>= 1.1 hr

Solution:

a) Magnesium in Aluminum diffusion:

D = Do * exp(-Qd / RT)

  =  (1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15)

  = 4.88 * 10^(-14) m^2 / s

D = 4.88 * 10^(-14) m^2 / s

b) The composition remains same at say the distance Xo:

(Cx - Co) / (Cs - Co) = Constant

Xo^2 / D_{550} * <em>t </em>= Xo^2 / D_{450} * 15

D_{550} * <em>t </em>= D_{450} * 15

(1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15) * <em>t</em>

(4.88 * 10^(-14) m^2 / s) * 15

by, solving for <em>t </em>we get:

 <em>t </em>= 1.1 hr

So, the time required is 1.1 hr.

5 0
3 years ago
Victoria has a .... of playing with her hair when she gets nervous​
IrinaK [193]

Answer:

Victoria has a tendency of playing with her hair when she gets nervous.

Explanation:

I believe this is what you are asking for.

:))))

6 0
3 years ago
Find and record a set of instructions containing a repetition clause (e.g., instructions on a shampoo bottle, a recipe, etc.). H
Leto [7]

This question belongs to scratch programming. This programming language has various instructions to carry out various tasks. There are different types of repeat statement available. This statement or instruction allows the user / programmer to repeat certain line of statements to a number of times. Here, according to the question, we need to use “Repeat after me”

If you take a music note, the tempo, timing and pitch needs to be mentioned clearly and “:” represents that a particular note to be repeated only once.

3 0
3 years ago
Other questions:
  • Why is driving a privilege?
    15·2 answers
  • You’re responding to a troubleshooting ticket about a laser printer in HR that isn’t working. According to reports, the printer
    7·1 answer
  • Which of the following statements is correct?
    11·1 answer
  • A byte contains how many bits? Question 3 options:
    13·2 answers
  • Which of the following tools helps ensure your document will open in older versions of word
    13·1 answer
  • 75 pts. Conduct online research about 10 of the most famous and dangerous computer viruses that threatened computer networks aro
    13·1 answer
  • What is a typical use for a MAN?
    13·1 answer
  • 6.23 Lab training: Unit tests to evaluate your program Auto-graded programming assignments may use a Unit test to test small par
    13·1 answer
  • Give an example of how loops are used in programming Kturtle​
    7·1 answer
  • What types of company functions are aided by ERP?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!