Question: Pyhton Define three variables var 1 , var 2 and var 3 . Calculate the average of these variables and assign it to average. Print

Pyhton
Define three variables var1, var2 and var3. Calculate the average of these variables and assign it to average. Print the average. Add at least one comment.
Examples:
% python3 prog06.py
enter var1: 1
enter var2: 2
enter var3: 3
the average is: 2.0
% python3 prog06.py
enter var1: 3
enter var2: 5
enter var3: 7
the average is: 5.0
% python3 prog06.py
enter var1: 2
enter var2: 5
enter var3: 7
the average is: 4.666666666666667
%
put the code in a file called prog06.py
use the following code as a starter.
var1= int(input("enter var1: "))
var2= int(input("enter var2: "))
var3= int(input("enter var3: "))
#your code starts here:
#your code ends here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!