Question: A possible CodeRunner question of the type Fill in the gaps could be the following. You are obliged to fill in the gaps within the

A possible CodeRunner question of the type "Fill in the gaps" could be the following.
You are obliged to fill in the gaps within the given code.
The gaps are marked by ??? and commented with # task 1 and # task 2.
The function calc(num) should test if a given positive number num is a prime number or not.
Accordingly, the output should be "num is a prime number" or "num is not a prime number".
Your code is automatically checked with several test cases. Two of them are listed here with the expected result.
For example:
Test Result
calc(3)
3 is a prime number
calc(6)
6 is not a prime number

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!