Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following code segment is intended to find the average of five test scores e

ID: 3834630 • Letter: T

Question

The following code segment is intended to find the average of five test scores entered by the user. It does not work as intended. What one "fix" could be made so that the program works as intended? The code segment below is intended to exchange the values of the variables num 1 and num2. For example, if the initial value of num1 is 5 and the initial value of num2 is 4 then after the code segment is executed, the value of num1 should be 4 and the value of num2 should be 5.The code does not work as intended. What is the result when after the code is executed? Num1 = ___ num2 = ____ write code to complete the intended task. A coach is told to enter the weights of all of her team members. Weights between 100 and 200 inclusive are acceptable. When a weight is entered, a block recordweights is executed to do whatever calculations are necessary, complete the two below so that a sentinel value is used to terminate the input; Unacceptable weights should not be included in the calculations, nor should the sentinel value.

Explanation / Answer

1. change sum by score must be changed to add sum to score.

2. a) num1 = 4

num2 = 4

b) set temp to num1

set num1 to num2

set num2 to temp

3) repeat until weight is -1 // if user enters -1 the loop will terminate
if weight less than or equal to 200 and weight greater than or equal to 100

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote