The following piece of code will print a text based on the divisibility of number.
If the number is not divisible by 3, 5 and 7, then the number gets printed.
Does making use of a f-string make the type cast of integers to string implicit?
def convert(number):
result = ""
if (number % 3 == 0):
result += "Pling"
if (number % 5 == 0):
result += "Plang"
if (number % 7 == 0):
result += "Plong"
if(number % 7 != 0 and number % 5 != 0 and number%3 != 0):
result = f{'number'}
return result