← Back to Functions
Question 325
Average Of Two Numbers
Average Of Two Numbers
Complete average_of_two(a: float, b: float) -> float so it returns the average of its two parameters, their sum divided by 2. The driver reads two decimal numbers and prints what the function returns; leave it alone. Input: two lines, each a number, no prompts. Output: the average as Python prints a float.
Expected Output:
5.0= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Functions
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.