0% found this document useful (0 votes)
12 views2 pages

Python Programs for Basic Calculations

The document contains several Python programs demonstrating basic functionalities. It includes programs for converting Celsius to Fahrenheit, calculating the area and circumference of a circle, finding the maximum of two numbers, determining if a number is even or odd, and calculating the sum of two numbers. Each program uses user input and prints the results accordingly.

Uploaded by

prajeshnayek
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)
12 views2 pages

Python Programs for Basic Calculations

The document contains several Python programs demonstrating basic functionalities. It includes programs for converting Celsius to Fahrenheit, calculating the area and circumference of a circle, finding the maximum of two numbers, determining if a number is even or odd, and calculating the sum of two numbers. Each program uses user input and prints the results accordingly.

Uploaded by

prajeshnayek
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

PYTHON PROGRAMS

Fahrenheit

C=float(input(“enter c=”))
f=c/5*9+32
print(“f=”,f)

Area of a Circle

R=float(input “entre radius=”))


A=3.14*r**2
C=2*3.14*r
Print(“area=” ,a)
Print(“cir=”,c)

FINDING MAX NUMBER

a=int(input(“enter 1st no=”))


b=int(input(“enter 1st no=”))
if a>b:
print(“max=”,a)
else:
print(“max=”,b)

FINDING EVEN OR ODD NUMBER

a=int(input(“enter no=”))
if a%2==0:
print(“even no”)
else:
print(‘odd no”)

FINDING SUM NUMBER

a=int(input(“enter 1st no=”))


b=int(input(“enter 2nd no=”))
c=a+b
print(“sum=”,c)

You might also like