Exercise 8.2.6: AverageWrite a function called average that prints out the average of two numbers. Then in your start function, make several calls to the triple function to test it out.

For example, if you made a call like

average(10,4)
it should print out 7.

Your function must be named average

Respuesta :

Alright, so I am new with python at the moment and I am absolutely confusing myself with such a simple task. I have to write a function to calculate the average of two numbers, but the user must input the numbers so the average should print out.

I keep getting a a name error, name 'number2' is not defined.Below is my code.