Objective
Create a Python program that stores the coordinates of a point in a tuple and unpacks them to show them.
Instructions
- Read two integers,
xandy. - Store them in a tuple
point = (x, y). - Unpack the tuple into two variables,
aandb. - On the first line show
Point: (a, b). - On the second line show
Distance to the origin: D, with the distancesqrt(a² + b²)to two decimals.
6
8
Point: (6, 8)
Distance to the origin: 10.00
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise