Find First Digit of a Number Python program

In the previous article, we explored Global Variables in Python, now we will look at how we can obtain the first digit of any given number. We have also seen how we can obtain the last digit of a number in an older different article. For example, if the input values are: 7549: It should … Read more

All Divisors of a Number in Python

In the previous article, we saw how we can determine a Prime Number using Python logic and syntax. In this article we will explore All Divisors of a Number in Python. Imagine that we have a tower of height 12 using equal size blocks, we need to find the size of all the blocks that … Read more

Optimized solutions in Python for All Divisors and Prime Number

In the previous article we explored programs for obtaining all divisors of a given number. Let us see the ways in which we can discuss optimize the programs in the previous article as well as the program for Prime Numbers. Optimizing programs in recent usage or legacy code is important as we gain new knowledge … Read more

Multiplication Table of a Number in Python

In the previous article we explore the For Loop structure, now let us take a look at an example case of printing Multiplication Table of a Number in Python. If a user provides the number 3, we return 3, 6, 9, 12, 15, 18, 21, 27 and 30. If the number specified was 5 instead … Read more