Problem
Python code for this:
Pseudocode
• Define a variable called "count" and set it equal to 0.
• Define a variable called "value" and set it equal to 0.
• Define a variable called "weight" and set it equal to 0.
• Define a variable called "sum" and set it equal to 0.
• Define a variable called "sumw" and set it equal to 0.
• Define a variable called "avg" and set it equal to 0.
• Start a while loop that will run while "count" is less than 5.
• Within the while loop, prompt the user to input a value.
• Set the "value" variable equal to the inputted value.
• Prompt the user to input a weight.
• Set the "weight" variable equal to the inputted weight.
• Set the "sumw" variable equal to the sum of the "weight" and "sumw" variables.
• Set the "sum" variable equal to the sum of the "value" and "sum" variables multiplied by the "weight" variable.
• Increment the "count" variable by 1.
• End the while loop.
• Set the "avg" variable equal to the "sum" divided by the "sumw" variable.
• Print the "avg" variable.