LearnPy Hub
← Variables problems
Medium

Price Change in Percent

Read an old price and a new price. Print the change in Tk and the change in percent of the old price with 1 decimal (negative if the price fell), on two lines.

Input

Two numbers (old > 0).

Output

Two lines.

Sample 1

Input
100
120
Output
20
20.0

Sample 2

Input
80
60
Output
-20
-25.0
solution.py
Output appears here
Price Change in Percent · Python practice problem · LearnPy Hub