Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
Introduction
Text values
Variables
Functions
Summary
26. Exercise 2

Instruction

Nice job! How about this one?

Exercise

John likes to write blog articles in his spare time. He's measuring the quality of such articles with a metric called a read ratio. A read ratio is defined as the number of readers divided by the number of viewers. The closer the read ratio is to 1, the more viewers read the article. For one of John's articles, we've stored the number of readers in a variable named no_readers and the number of viewers in a variable named no_viewers.

Calculate the read ratio for this article, and check if the result is greater than 0.5 (which means more than half of the viewers read the article). R should return TRUE if the read ratio is greater than 0.5 and FALSE otherwise.