CPSC150A
Scientific Computing

Activity 4

Reassignment and Updating

Average

Write a python program that reads 4 numbers from the user and prints the average of the numbers. Note, this program could be written without reusing or updating any variables, but for the sake of practice, write the program using only one variable to compute the sum.

Example

Enter a number:
                                                            1.0
Enter a number:
							    2.0
Enter a number:
							    3.0
Enter a number:
							    4.0
The average is 2.5