Write a Python function called weighted average (), which reads four variables from the keyboard and displays a message with the weighted average. The input variables are: the first note, followed by its weight, and the second note, followed by its weight. The 4 variables given as input are real numbers, and the displayed result is a real number.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 17SA: Write the definition of a function that takes as input two decimal numbers and returns first number...
icon
Related questions
Question

Question 2: Write a Python function called weighted average (), which reads four variables from the keyboard and displays a message with the weighted average. The input variables are: the first note, followed by its weight, and the second note, followed by its weight.
The 4 variables given as input are real numbers, and the displayed result is a real number.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning