subject
Mathematics, 28.08.2021 01:00 kimhayleeshook50

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

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 18:10
Television sizes are based on the length of the diagonal of the television's rectangular screen. so, for example, a 70-inch television is a television having a diagonal screen length of 70 inches. if a 70 inch television's diagonal forms a 29Ā°angle with the base of the screen, what is the vertical height (1) of the screen to the nearest inch? 70 inhin
Answers: 3
question
Mathematics, 21.06.2019 22:10
Which of the following circles have their centers in the third quadrant?
Answers: 2
question
Mathematics, 21.06.2019 23:40
From the top of a tree a bird looks down on a field mouse at an angle of depression of 50Ā°. if the field mouse is 40 meters from the base of the tree, find the vertical distance from the ground to the bird's eyes.
Answers: 1
question
Mathematics, 22.06.2019 02:30
3/4 + p = 1/2? iā€™m not sure how to solve it
Answers: 1
You know the right answer?
It is good programming style to always use a for loop when the number of times to repeat the action...
Questions
question
Social Studies, 17.12.2020 04:30
question
English, 17.12.2020 04:30
question
Mathematics, 17.12.2020 04:30
question
Mathematics, 17.12.2020 04:40
question
Mathematics, 17.12.2020 04:40