Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The code on Line#2 sets the value of the variable randomNumber to a random integer between 1 and 15. Add code to check if the
The code on Line\#2 sets the value of the variable randomNumber to a random integer between 1 and 15. Add code to check if the value of randomNumber is between 0 and 10 (consider values of exactly 0 and exactly 10 to be in range). If the value is in this range, assign the value 1 to the variable checkRange. If the value is NOT in this range, assign the value 0 to the variable checkRange. Use an if-else statement in your solution. Do NOT overwrite the value of the variable randomNumber. \% Enter the commands for your function here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started