Python program to find factorial of a number Sarfraz Alam December 20, 2017 # Python program to find the factorial of a number using recursion def factorial(n): """Function """ ... Read More
Python program to check number is Prime Sarfraz Alam December 15, 2017 num = input('Please enter a number:') i = 2 Flag= 0 while i<num: if num%i ==0 Flag= 1 print ("Your number is NOT a pr... Read More
Simple python program Sarfraz Alam December 12, 2017 A simple program that displays “Hello, User!”. It's often used to show the syntax of the language. Print('Hello , User!') Read More
Calculator in python Sarfraz Alam November 16, 2017 def add(a,b): c=a+b return(c) d=add(3,4) print(d) def changelist(mylist): mylist.extend([1,2,3,4]) return my... Read More
Input Output in Python Sarfraz Alam November 10, 2017 Opening and Closing Files Until now, you have been reading and writing to the standard input and output. Now, we will see how to use actua... Read More
Catching Exceptions in Python Sarfraz Alam November 10, 2017 In Python, exceptions can be handled using a try statement. A critical operation which can raise exception is placed inside the try claus... Read More