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]
2 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]2 years ago
7 0

myprod = 1

num = input("Enter a number: ")

for i in range(1, 5):

myprod *= num

You might be interested in
A system of linear inequalities is shown below:
Yuki888 [10]
The 4th selection is appropriate:
  The first line is a dashed line which joins ordered pairs (-2, 1) and (3, 1). The second line is a dashed line and joins ordered pairs (-2, -2) and (3, 3). The portion common above the first line and above the second line is shaded

6 0
2 years ago
What’s the answer no links.
lisabon 2012 [21]

Answer:

12÷2?

I guess I dunno :/ lel

4 0
3 years ago
What is the inverse function of f(x)=2x-1
Goshia [24]

Step-by-step explanation:

Given

f(x) = 2x - 1

f^-1 (x) = ?

Now

Let y = f(x)

or y = 2x - 1

Interchanging the role of x and y

x = 2y - 1

x + 1 = 2y

y = <u>x </u><u>+</u><u> </u><u>1</u>

2

Therefore f^-1(x) = <u>x </u><u>+</u><u> </u><u>1</u>

2

Hope it will help you :)

8 0
3 years ago
PLS HELP!!<br><br> What values of u and v make triangle XYZ = Triangle GFH
Katarina [22]

Answers:

u = 18

v = 20

========================================================

Work Shown:

The leg YZ is congruent to the left FH

This means YZ = FH and that leads to u+v-18 = 10u-8v

The hypotenuse ZX is congruent to the hypotenuse HG

This means ZX = HG and we get the equation 14v-14u+32 = v+u+22

----------------------

The system of equations we have so far is

u+v-18 = 10u-8v

14v-14u+32 = v+u+22

Let's get the equations into standard form

Start with the first equation

u+v-18 = 10u-8v

u+v = 10u-8v+18

u+v-10u+8v = 18

-9u+9v = 18

-9(u-v) = 18

u-v = 18/(-9)

u-v = -2

Note how we can solve for the variable u to get

u = v-2

which we'll use later

----------------------

Let's get the other equation into standard form as well

14v-14u+32 = v+u+22

14v-14u-v-u = 22-32

-15u+13v = -10

Now plug in u = v-2 and solve for v

-15u+13v = -10

-15(v-2) + 13v = -10

-15v+30+13v = -10

-2v+30 = -10

-2v = -10-30

-2v = -40

v = -40/(-2)

v = 20

Which means,

u = v-2

u = 20-2

u = 18

3 0
2 years ago
What is 42/66 written in lowest terms?
SSSSS [86.1K]

Answer:

\frac{7}{11}

Step-by-step explanation:

By lowest terms, it means to simplify. You can do so by dividing the fraction by a common factor, which in this case, is 6:

\frac{42}{66} ÷ \frac{6}{6} =

\frac{7}{11}

The fraction \frac{7}{11} cannot be simplified further, so this is the final answer.

8 0
3 years ago
Other questions:
  • A random sample of 20 recent weddings in a country yielded a mean wedding cost of $ 26,388.67. Assume that recent wedding costs
    10·1 answer
  • What ratio is equivalent to 8 to 2
    13·2 answers
  • A courtyard in the shape of a right triangle is set in the middle of three square office buildings, with one office building alo
    10·1 answer
  • the following data values represent a sample. what is the variance of the sample? x=9. use the information in the table to help
    6·1 answer
  • Suppose that 9 is a factor of a number
    7·1 answer
  • Which of the following is two-dimensional and infinitely large?
    12·1 answer
  • The total number of adults and students with Library cards in 27814. Of that total 11480 are student
    6·2 answers
  • Find the derivative of the function f(x)= (x^2-x) ^2
    5·2 answers
  • a captain and co captain for a soccer team are chosen from a hat with the names of all 10 members in the hat. determine the prob
    9·1 answer
  • Write the following numbers in order of size start with the smallest. 0.32 0.4 0.35 0.309
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!