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
I need on this one please
Flauer [41]
Aimme is right. All the sides are obtuse. They do not equal exactly 90 degrees.
8 0
3 years ago
Read 2 more answers
Help ill give brainliest and a thank you and 5 star if correct
Temka [501]

Answer:

85%

Step-by-step explanation:

The discount is 15% which we can write as 0.15 and we multiply that by 30 to get the discount, which is $4.50. We subtract that from the original price; 30 to get $25.50 as the sale price. We want to find out what percent of 30 25.50 is, so we divide 25.50 and 30 to get 0.85. Multiply that by 100 to get 85%.

5 0
3 years ago
Is is true that the coefficient of the expression 18z-7(-3+2z) of z is 13
Sever21 [200]
<span>18z-7(-3+2z) 
= 18z + 21 - 14z
= 4z + 21

answer is False
</span><span>coefficient of z is 4, not 13</span>
3 0
3 years ago
The speed of light is 299,792.458 .
andrezito [222]

Answer:

a

when you round the number up it becomes 300,000.00

3 0
2 years ago
Need help with math problem
Nikolay [14]
10 (1/2) = 5

hope this helps
4 0
3 years ago
Read 2 more answers
Other questions:
  • I need to pass this question
    5·1 answer
  • Is 5 a perfect square
    12·2 answers
  • Need help on this two column proof for geometry
    9·1 answer
  • Identify the percent of change as an increase or a decrease.
    5·1 answer
  • Simple question can I get help plz
    6·2 answers
  • Ms. Tompkins had an amount of money in the bank. After she deposited $100, she had at least $550 in the bank. how much money did
    15·1 answer
  • 975 toffees are to be distributed among 23 children. Estimate the numbers of toffees that each child will get in nearest tens.
    10·1 answer
  • PLEASE HELP
    9·1 answer
  • What is the slope of the graph Options are 1,3,5<br><br><br> I’ll mark you brainlist
    10·1 answer
  • Daniel wants to do 208 practice problems to prepare for an exam. If he wants to do 8 problems a day, how many days
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!