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
Hello, I need Help Please What is the Descending Order 219746, 612191, 194937
jolli1 [7]

Answer:

124679 111269 134788

Step-by-step explanation:

this is the answer

7 0
3 years ago
Which of the following represents the sentence shown? “Twice a number, n, decreased by six is fourteen.”
Fed [463]
Twice the number n will be expressed as 2n.  So, that will be in our final answer.  In order to decrease the number by 6, we will subtract 6.  So there will be a - 6 in our final answer.  Together, this is 2n - 6, and that is the same as the second option.  So, the second option is the correct one.
8 0
3 years ago
The function h(x) = x2 + 14x + 41 represents a parabola.
defon
Part A:

h(x)= x^{2} +14x+41

The first step of completing the square is writing the expression x^{2} +14x as (x+7)^{2} which expands to x^{2} +14x+49.

We have the first two terms exactly the same with the function we start with: x^{2} and 14x but we need to add/subtract from the last term, 49, to obtain 41. 

So the second step is to subtract -8 from the expression x^{2} +14x+49

The function in completing the square form is
h(x)= (x+7)^{2}-8

Part B:

The vertex is obtained by equating the expression in the bracket from part A to zero

x+7=0
x=-7

It means the curve has a turning point at x = -7

This vertex is a minimum since the function will make a U-shape. 
A quadratic function a x^{2} +bx+c can either make U-shape or ∩-shape depends on the value of the constant a that goes with x^{2}. When a is (+), the curve is U-shape. When a (-), the curve is ∩-shape

Part C:

The symmetry line of the curve will pass through the vertex, hence the symmetry line is x=-7

This function is shown in the diagram below




3 0
4 years ago
Read 2 more answers
Factor completely and then place the factors in the proper location on the grid.<br> x2 + 13x + 36
Alexxandr [17]

1. x^2 + 13x + 36 = 0  

using powerful & time-sparing quadratic formula :  

delta = 13^2 - 4*1*36 = 25 = 5^2  

x1 and x2 = (-13 -/+ 5)/2 = -9 and -4  

x^2 + 13x + 36 = (x+9)(x+4)  

2. other way : complete the square  

b^2 + 12b + 32 = b^2 + 2*6b + 6^2 - 6^2 + 32  

b^2 + 12b + 32 = (b+6)^2 - 4  

b^2 + 12b + 32 = (b+6-2)(b+6+2) = (b+4)(b+8)  

3. other way : -4 "ovious" solution : (-4)^2 - (-4) -20 = 0  

so the other is : -4 . a2 = -20/1 ---> a2 = 5  

a^2 - a - 20 = (a-5)(a+4)  

4 0
3 years ago
Read 2 more answers
Math quick help plzzzzzz.............
aleksandrvk [35]
$682.5 is your answer. Hope it helps
4 0
4 years ago
Read 2 more answers
Other questions:
  • Which shows the expression below simplified? 0.000085 - (4.1 × 10-6) A. 8.09 × 10-5 B. 8.09 × 10-6 C. 4.4 × 10-5 D. 4.099915 × 1
    14·1 answer
  • If a borrower obtains an interest-only loan of $112,500 at an annual interest rate of 6%, what is the monthly interest payment (
    12·1 answer
  • Which term describes the vector sum of the forces acting on a body?
    6·2 answers
  • Why might algebra tiles not be a good tool to use to factor x² + 18x +80
    10·1 answer
  • What is the net decimal percentage of 40% 30% 15%
    7·1 answer
  • What is the fraction as a decimal?<br> 2<br> -0.015<br> -0.15<br> -0.15<br> -0.15
    11·1 answer
  • If one gallon of paint covers 825sq.ft how much paint is needed to cover 2640 sq.ft
    6·2 answers
  • Solve for all values of x by factoring.<br><br> X^2-x+1=3
    7·2 answers
  • Solve for x. Round to the nearest tenth as needed
    9·1 answer
  • HELP I NEED HELP ASAP HELP I NEED HELP ASAP HELP I NEED HELP ASAP HELP I NEED HELP ASAP
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!