Conversion Rate for Variant A
Marlow & Finch sell kitchenware online. Their checkout page has not changed in three years, and the growth team suspects the Place order button is getting lost near the bottom of it. Before anyone argues about a redesign, somebody has to say plainly how the page performs today.
Each month the team records every visit that reached checkout and whether that visit ended in a completed order. The unchanged page is the control arm, and they call it Variant A. The same report is produced for each month, and the traffic is never the same twice.
A conversion rate answers one question: how often does a visit turn into an order? It is reported as a proportion between 0 and 1, so a rate of 0.2 would mean one visit in five ended in an order.
Task: Print Variant A's conversion rate as a single proportion between 0 and 1. Leave it unrounded, and do not scale it up into a percentage.
Input
The first line holds one integer, the number of visits that ended in a completed order. The second line holds one integer, how many people reached the checkout page in total (at least 1).
Output
One line holding the conversion rate as a proportion, printed the way Python prints a float.
Example:
Input:
50
1000
Output:
0.05
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in