All problems

Sample Proportion

easyPythonSampling

A drinks company has run street taste tests for Brand A in several cities and wants a headline for the press release. In each city interviewers stopped a number of people and recorded how many said they preferred Brand A. Everyone stopped gave an answer, so every response counts as part of that city's survey, including the people who named something else.

Task: Print the sample proportion who preferred Brand A, measured across everyone surveyed in the city. A "success" here is a respondent naming Brand A, and the answer is a proportion between 0 and 1 rather than a percentage. Print the raw number - no rounding is asked for.

Input

The first line holds one integer, the number of people stopped (at least 1). The second line holds one integer, how many of them preferred Brand A.

Output

One line holding the proportion, printed the way Python prints a float.

Example:

Input:
200
84

Output:
0.42

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

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…