Answer:
Check the explanation
Explanation:
solution a:
def Rotate(string) :
n = len(string)
temp = string + string
for i in range(n) :
for j in range(n) :
print(temp[i + j], end = "")
print()
string = ("abcde")
Rotate(string)
solution b:
nums = [3,9,5,8,2,4,7]
res = list(filter(lambda n : n < 5, nums))
print(res)
<span> The OSX IDLE provides the functionality of typing multiple lines of the code. You can find the IDLE environment easily over the internet. </span><span />
False. I think the $ sign is used for that. e.g. $A$4.
Answer:
- bool isDivisibleBy(int n, int d){
-
- if(n % d == 0){
- return true;
- }
- else{
- return false;
- }
- }
Explanation:
To check if n is divisible by d, we can use modulus operator such as %. If n % d equal to 0, this means n is divisible by d. Modulus operator is to calculate the remainder obtained from a division. If a number is divisible by another number, the remainder will be 0.
By making use of this concept we can create if and else statement to check if n % d is equal to 0, return true (divisible) else return false (not divisible).
The answer to this question is B