Professional Documents
Culture Documents
Project Report On
Python Programming
Subject: Computer Science
2022-2023
Name: Rhea Shingote
Class: 11th Science
Roll no: 31 Exam Seat no:
CERTIFICATE
Rhea Shingote
XI Science
Index
Input a welcome
1. message and display 6
it.
Input two numbers
and display the
2. 6
larger/smaller
number.
Input three numbers
and display the
3. 6
largest/smallest
number.
Determine whether a
number is a perfect
4. number, an 7-8
Armstrong number
or a palindrome.
Python programming
if (a>b):
print (a, "is the greater number")
else:
print (b, "is the greater number")
a. Perfect number.
for r in range(1,a):
if a%r==0:
sum=sum+r
if sum==a:
print ("number is a perfect number")
else:
print ("number is not a perfect number")
b. Armstrong number.
while (a>0):
digit=a%10
sum+=digit**order
a=a//10
if (sum==copy_a):
print ("number is an Armstrong number")
else:
print ("number is not an Armstrong number")
c. Palindrome.
while (a>0):
digit=a%10
reverse=reverse*10+digit
a=a//10
if (copy_a==reverse):
print("number is a palindrome")
else:
print("number is not a palindrome")
if a==1:
print ("number is not prime or composite")
break
else:
print ("number is prime")
x=0
y=1
if x>y:
smaller=y
else:
smaller=x
for i in range(1,smaller+1):
if((x%i==0) and (y%i==0)):
hcf=i
lcm=(x*y)/hcf
print ("the hcf of " ,x, "and " ,y, "is " ,hcf)
print ("the lcm of " ,x, "and " ,y, "is " ,lcm)
if i.islower():
lowercase = lowercase + 1