Question: Previously, we created a script that determined if a number was EVEN, or more specifically, divisible by 2. Create a script that prompts the user

Previously, we created a script that determined if a number was EVEN, or more specifically, divisible by 2. Create a script that prompts the user for a number and a divisor. In the script, create a function named is_divisible, and pass in the number and divisor as parameters. The function should then return true or false if the number was cleanly divisible (i.e. no remainders). The script reports if the number was divisible Sample output What is the number: 42 What is the divisor: 7 42 is divisible by 7 What is the number: 24601 What is the divisor: 3 24601 is NOT divisible by 3 What is the number: 78 What is the divisor: 6 76 is divisible by 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!