Wednesday, March 6, 2019

codingdirectional: Is a number divisible?

After we have wrapped up the previous Forex project we will go easy today by solving a simple question from Codewars and then I will talk about the future plan for this website at the end of this post.

The question goes like this, we are given a number where we will need to create a method to determine whether that number is divisible by the two following numbers or not, if so then the method will return True or else it will return False.

def is_divisible(n,x,y):
    if(n % x == 0 and n % y == 0):
        return True
    else:
        return False

It is pretty much a straight forward and simple solution. Hope you like this one.

Alright, let us talk about the future of this website a little bit. After the previous project, I think I will start to create many more small scale projects in the future that will probably take a week time to finish for each one of them. The future project will not relate to the financial stuff anymore but if you want to read more projects such as the previous Forex project then I have created another new website where it will host all the python projects that are related to stock, Forex, and cryptocurrency, if you are interested in this type of project then do visit this site through this link.

So much for that, we will begin our next project in the next chapter.



from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...