Skip to main content

Posts

Showing posts from May, 2021

Factorial of a Number by a User-Defined Function (PCTS)

 Factorial of a Number There are a number of ways to find the factorial of a number (obviously, it going to a whole number 😆). Out of all of them today, I'm going to show you the user-defined code I created to find the factorial of any whole number. Trust me, it's cool 😎 just give it a try...

For Loops

 The for loop By  polygraphus  on  shutterstock Def: The for loop is also known as the counting loop and is designed to process the items of any sequence, such as a list or a string, one by one. General form of for loop: The general form of the for loop is given below:      for <variable> in <sequence>:          statements to repeat