Jax L.

asked • 01/30/23

Write the function divSpecial that takes an positive integer n1 and returns a string according to the following conditions .

divSpecial (n1)

Write the function divSpecial that takes an positive integer n1 and returns a string according

to the following conditions

- if n1 is divisible by 5, it should return “divFive”

- if n1 is divisible by 11, it should return “divEleven”

- if n1 is divisible by both 5 and 11, it should return “Bingo”

- if n1 is a prime number other than 11, it should return “Go Blazers”

- otherwise it should return the cube of n1 as a string

Sample Inputs Expected Outputs

n1=15 “divFive”

n1=77 “divEleven”

n1=110 “Bingo”

n1=17 “Go Blazers”

1 Expert Answer

By:

David T. answered • 01/30/23

Tutor
New to Wyzant

Experienced Computer Science Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.