Functions are block of code to perform some task or return some value. Functions can be reuse by the programmer. Using formatted string instead of
Author: AnthonyC
Why 0!(zero factorial) = 1
We can use the pattern of series numbers to show that 0! is equal to 1. 10! = 3628800 3628800 / 10 = 3628809! =
Permutation and Combination
Lets start with definitions. Permutation is the number of subsets you can form from a set considering the order as a factor / order is
Switch 2 variables without using a 3rd variable in C++
Quite confusing right? 😃
Using Python’s tuple packing and unpacking to switch 2 variables
Tuple is somehow similar to a List in Python except that the elements in a tuple is immutable (cannot be change or modified throughout the
Random Number Generator and Linear Congruential Generator(LCG) using Python
Random number generated by Python are called pseudo random number. The pseudo random number generator (PRNG) algorithm by Python uses a starting point ( aka
