Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

my_f loor _using only simple expressions, write an \'r\' function, named \'my_fl

ID: 3378811 • Letter: M

Question

my_f loor _using only simple expressions, write an 'r' function, named 'my_floor', that accepts a floating-point number x' and returns the greatest integer number that is less than or equal to the floating-point number. (The returned value does not have to be integer type.)_ _You are allowed to use the base arithmetic operators ' + , -, *, ^' comparison operators (see 'help(comparison)'), and control operators (see 'help(control)'). Do not use 'floor ()', 'roundO', 'as. integer ()', or even ':' or the '%%' modulo operator, or any other functions._ _ These restrictions on usable functions will limit you to a fairly crude method of floor._ {r} my_floor

Explanation / Answer

The R-code required is shown below:

Navigate



Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.