Social Networking Friend Distance
EasyP3Coding
Return the allowed distance for friends by age:
| Age | Result |
|---|---|
| below 13 | "1 Kms" |
| 13 to 17 | "5 Kms" |
| 18 to 29 | "10 Kms" |
| 30 and above | "You Can Have Friends From Anywhere" |
Example 1
- Input
- age = 10
- Output
- "1 Kms"
Example 2
- Input
- age = 15
- Output
- "5 Kms"
Example 3
- Input
- age = 25
- Output
- "10 Kms"
Constraints
- 0 <= age <= 120
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 12. ⌘Enter runs, ⌘⇧Enter submits.