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
horsena [70]
3 years ago
8

It is good programming style to always use a for loop when the number of times to repeat the action is known. The following code

uses a while loop that mimics what a for loop should do. Rewrite it using a for loop that accomplishes exactly the same thing.
myprod = 1;
i = 1;
while i <= 4
num = input('Enter a number: ');
myprod = myprod ⁎ num;
i = i + 1;
end
Mathematics
1 answer:
Paraphin [41]3 years ago
7 0

myprod = 1

num = input("Enter a number: ")

for i in range(1, 5):

myprod *= num

You might be interested in
What is the volume of this cone?
Andrej [43]

Answer:

Option A 41.9\ ft^{3}

Step-by-step explanation:

we know that

The volume of a cone is equal to

V=\frac{1}{3}\pi r^{2} h

In this problem we have

r=4/2=2\ ft, h=10\ ft

substitute the values

V=\frac{1}{3}\pi (2)^{2}(10)

V=41.9\ ft^{3}

6 0
3 years ago
Read 2 more answers
The LCD of theses fractions? <br> y/x + y/3+ y+1/y<br><br> Answers:<br> 3x+y<br> x+3+y<br> 3x+y
Dahasolnce [82]
3xy 

<span>y(3y)/3xy + y(xy)/3xy + (y+1)(3x)/3xy </span>

<span>NOW since all of the fractions have a denominator of 3xy, drop the denominators and solve using the numerators. </span>

<span>y(3y) + y(xy) + (y+1)(3x) </span>

<span>3y^2 + xy^2 + 3xy +3x </span>

<span>cannot simplify further.</span>
5 0
3 years ago
A puppy and kitten are 180 meters apart when they see each other. The puppy can run at a speed of 25 meters per second, while th
Gnom [1K]

It seems it should be the other way... . How soon will the puppy catch up with the kitten.

The way you have it the kitten will never catch the pup. There is already 180m between them so, the distance will only increase because the puppy runs faster than the cat.

If the puppy runs after the cat, will eventually catch up with it and can be calculated. Not the other way around.

If the pup runs after the cat, the distance between them will decrease and the pup will catch the cat.

RT = D kitten

RT = D+180 puppy

20T = D

25T = D + 180

Substitution

25T = 20T +180

5T = 180

T = 36s

7 0
3 years ago
The change in the value of an account when given to the nearest dollar?
devlian [24]
What changes may occur if the given dollar will be rounded off to its nearest value.
<span>There will only be 2 chances, the dollar will become smaller or bigger. Why? </span>
Because in mathematical rules of rounding off numbers:
number below 5 will be round down and 5 and up will be rounded up.
For example:
You have a bill of $6.79  since the number next to the decimal point in the right is 7, it will be rounded up to $7.
<span>But if your bill is $6.25, it will be rounded down to $6.00 
</span>
I got this from a different brainy member
7 0
3 years ago
Can someone help me write the equations and solve, please.
Novay_Z [31]

Answer:

Number 11: She has to add 5/36 of a cup

Number 12: The present costs $22,2

Number 13: 56,7 pounds is the weight of the package.

Number 14: You started with 40 muffins

Step-by-step explanation:

<u>Number 11</u>: 1/4 = 9/36  and 1/9 = 4/36

3*1/4  -  3*1/9  = 3*9/36  - 3*4/36  = 5/36

<u>Number 12:</u> 13,32/x= 3/5 ( or 0,6)

x = 13,32/0,6 = 22,2

<u>Number 13:</u> x * 5/7 = 40,5

x = 40,5/ (5/7) or 40,5 * 7/5 = 283,5/5 = 56,7

<u>Number 14:</u> 12/x = 3/10 (or 0,30)

x= 12/0,30 = 40

6 0
3 years ago
Other questions:
  • Identical twins happen once
    11·2 answers
  • Can someone help me with this I’m begging you.!
    7·1 answer
  • One lap around a parking lot is 3/10 mile. This represents 15% of the total distance Gregory ran.
    11·1 answer
  • Solve the value of s<br><br> (s-4)+58=180
    8·2 answers
  • 6<br> 4.<br> 2<br> 74-22<br> 2<br> 4-<br> 6<br> Slope
    9·1 answer
  • Jason will us 1/3 gallon pitcher to fill an empty 3/4 gallon water jug
    9·2 answers
  • #1. Use substitution to solve the system of equations<br> y = 6x<br> 2x + 3y = -20<br> Solution: (
    11·1 answer
  • What is 151% of 70.Please explain how u did it.
    15·2 answers
  • A graphic design firm placed two orders for computers from Apple Inc. For their web design department, they purchased 2MacBook P
    14·1 answer
  • NO LINKS!!!<br><br>Please help me with parts b and c. ​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!