Arithmetic operators · 16 / 18 Exercise Easy

Equivalent operations

Objective

Write a Python program to ask the user for three numbers (a, b, c) and display the result of (a+b)*c and the result of a * c + b*c.

Instructions

  1. Request three numbers from the user (a, b, c).
  2. Calculate the result of (a+b)*c.
  3. Calculate the result of a * c + b*c.
  4. Display both results on separate lines.
Input
2
4
2
Output
12
12

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise