Abipravi has introduced an new web application for small finance to manage their daily collections and profit and loss. This app is used both online and offline the trail verson will be in offline. The premium pack will have the online support and also it has an high end security in django backend. Where the both back end as well as front end are encrypted This app is used both online and offline the trail verson will be in offline. The premium pack will have the online support and also it has an high end security in django backend. Where the both back end as well as front end are encrypted Click here View Demo
Code num = int(input("Enter a Number: ")) if (num == 0): fact = 1 fact = 1 for i in range(1, num5+1): fact = fact * i print("Factorial of ", num, " is ", fact) Explaination getting the input using the input function, But the input must be in the input format so for getting the input as integer type use int() function num = int(input("Enter a Number: ")) Check weather the given number is zero or not if the number is zero then the factorial value will be 1, so we can assume that fact is 1 if (num == 0): fact = 1 if the entered value is not equal to one then assume one variable fact = 1 and then create a for loop which starts from one to the value we want to find the fact value, And then multiple the previous fact value with the loop value For example: lets assume the loop value is [1,2,3,4.....n] then it will multiple the fact value with i value and stores the new...
Comments
Post a Comment