assignment_python_aditya1328
assignment_python_aditya1328
1 SET A
1)Python Program to calculate Area of Triangle
1
2 SET B
1)Write a python program to check if a number is Positive,Negative or zero
2
{
print("The number is zero")
}
3
[25]: a=int(input("enter a number greater than 2 "))
for i in range(2,a):
if (a % i)==0:
4
Enter a number 16
16 is not an Armstrong number
5)Write a python program to find the factorial of a number
Enter a number: 5
The factorial of 5 is 120
5
[11]: year=int(input("Enter year too check "))
if((year % 4 == 0 and year % 100 != 0) or (year % 400 == 0)):
print("The year is leap year")
else:
print("The year is not leap year")
6
79
83
89
97
5)Write a python program to print the fibonacci sequence
7
370
371
407
7)Write a Python Program to find sum of Natural Numbers