0% found this document useful (0 votes)
32 views8 pages

Sukruthi KC Python

This document contains a report submitted by Sukruthi KC from the Department of Computer Applications at BMS College of Engineering. The report includes 10 Python programs with sample outputs: 1) Check if a number is even or odd, 2) Convert Celsius to Fahrenheit, 3) Find the area of a triangle, 4) Find the average of integers, 5) Find the product of real numbers, 6) Find the circumference and area of a circle, 7) Check if a number is a multiple of 5, 8) Check if a number is a multiple of 5 and 7, 9) Find the average of 10 numbers using a while loop, and 10) Display an integer in reverse order. The report was submitted

Uploaded by

Sukruthi Kc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views8 pages

Sukruthi KC Python

This document contains a report submitted by Sukruthi KC from the Department of Computer Applications at BMS College of Engineering. The report includes 10 Python programs with sample outputs: 1) Check if a number is even or odd, 2) Convert Celsius to Fahrenheit, 3) Find the area of a triangle, 4) Find the average of integers, 5) Find the product of real numbers, 6) Find the circumference and area of a circle, 7) Check if a number is a multiple of 5, 8) Check if a number is a multiple of 5 and 7, 9) Find the average of 10 numbers using a while loop, and 10) Display an integer in reverse order. The report was submitted

Uploaded by

Sukruthi Kc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

BMSCOLLEGEOFENGINEERING

(AutonomouscollegeunderVTU)
Bull Temple Rd, Basavanagudi, Bengaluru, Karnataka
5600192020
DepartmentofComputerApplications

Report is submitted for the fulfillment of the AAT Work in the


subject“Python Programming”
(22MCA1PCPY)
Of
ISemester
MCA

By

NameofStudent: Sukruthi KC RegisterNumber:

DateofSubmission:4/3/2023

UndertheGuidance

RVRAGHAVENDRARAO
(AssistantProfessor)
18MCA5PEBC:BlockChainTechnology

1) Python program to check whether the given number is even or not.

num=int(input("Enter the number"))


if(num%2==0):
print("The number is even")
else:
print("The number is odd")

OUTPUT:

2) Python program to convert the temperature in degree centigrade to Fahrenheit.

temp=float(input("Enter temperature in celsius"))


print("Temperature in fahrenheit"+str(((9/5*temp)+32)))

OUTPUT:

DepartmentofComputerApplications,BMSCE Page2
18MCA5PEBC:BlockChainTechnology

3) Python program to find the area of a triangle whose sides are given.

a=int(input("Enter side 1 "))


b=int(input("Enter side 2 "))
c=int(input("Enter side 3 "))
s = (a + b + c) / 2
area = (s*(s-a)*(s-b)*(s-c))*0.5
print(area)

OUTPUT:

4) Python program to find out the average of a set of integers.

a=int(input("enter set of numbers "))


b=0
for x in range(a):
n=int(input("Enter number"+str(x+1)+":"))
b=b+n
print("average is " +str(b/a))

OUTPUT:

DepartmentofComputerApplications,BMSCE Page3
18MCA5PEBC:BlockChainTechnology

5) Python program to find the product of set of real numbers.

a=int(input("enter the number of set of real numbers "))


b=1
for x in range(a):
n=int(input("Enter number"+str(x+1)+":"))
b=b*n
print("product is " +str(b))

OUTPUT:

DepartmentofComputerApplications,BMSCE Page4
18MCA5PEBC:BlockChainTechnology

6) Python program to find the circumference and area of a circle with a given
radius.

r=float(input("Enter the radius"))


circumference=3.14*r*r
area=2*3.14*r
print("circumference of a circle " +str(circumference))
print("area of a circle " +str(area))

OUTPUT:

7) Python program to check whether the given integer is a multiple of 5.

a=int(input("Enter a number: "))


if a%5==0:
print("number is multiple of 5")
else:
print("number is not multiple of 5")

OUTPUT:

DepartmentofComputerApplications,BMSCE Page5
18MCA5PEBC:BlockChainTechnology

8) Python program to check whether the given integer is a multiple of both 5 and
7.

x=int(input("Enter a number: "))


if x%5==0 and x%7==0:
print("number is multiple of 5 and 7")
else:
print("number is not multiple of 5 and 7")

OUTPUT:

DepartmentofComputerApplications,BMSCE Page6
18MCA5PEBC:BlockChainTechnology

9) Python program to find the average of 10 numbers using while loop.

number=1
sum=0
while number<=10:

i=int(input("Enter number"+str(number)+":"))
sum=sum+i
number+=1
print("average is " +str(sum/10))

OUTPUT:

10) Python program to display the given integer in a reverse manner.

n=int(input("Enter number: "))

DepartmentofComputerApplications,BMSCE Page7
18MCA5PEBC:BlockChainTechnology

reverse=0
while(n>0):
dig=n%10
reverse=reverse*10+dig
n=n//10
print("Reverse of the number:",reverse)

OUTPUT:

DepartmentofComputerApplications,BMSCE Page8

You might also like