NEED HELP WITH PYHTON..PASTE INDENTED CODE PLZZ 4. Boolean Function a) Define a function, isInRange() with an integer parameter, x. This function returns true if the integer number x is in the range...


NEED HELP WITH PYHTON..PASTE INDENTED CODE PLZZ





4. Boolean Function
a) Define a function, isInRange() with an integer parameter, x.


This function returns true if the integer number x is in the range (-100, 100). Otherwise, return false. b) Define a main() function, in which a loop will be created to do the following ten times:


1) Get a random integer, n, in the range (-500, 500).


2) Call isInRange(x) function to determine and print out if the number n is in the range. c) Call main() function to initiate the tasks to be performed.


Example Output

2 is in the range.

-358 is not in the range.

-44 is in the range.

297 is not in the range.

-295 is not in the range.

205 is not in the range.

467 is not in the range.

-116 is not in the range.

388 is not in the range.

53 is in the range.




Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here