0% found this document useful (0 votes)
9 views5 pages

Practile No 1

The document contains multiple programming exercises that involve basic mathematical operations and conditional statements. Each exercise includes a problem statement, corresponding code, and an output description. The problems range from calculating sums and areas of geometric shapes to determining if a number is even or odd.

Uploaded by

dhruv10khedkar
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)
9 views5 pages

Practile No 1

The document contains multiple programming exercises that involve basic mathematical operations and conditional statements. Each exercise includes a problem statement, corresponding code, and an output description. The problems range from calculating sums and areas of geometric shapes to determining if a number is even or odd.

Uploaded by

dhruv10khedkar
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/ 5

PRACTILE NO.

:- 02

Problem Statement :- Write a program to accepts two integers


and print their sum.

Code :-
a=int(input('Enter the first integer:'))
b=int(input('Enter the second integer:'))

Sum=a+b

print('The sum of two integers are:', Sum)

Output :-
PRACTILE NO. :- 03

Problem Statement :- Write a program that accepts radius of a


circle and prints its area.

Code :-
r= int(input('Enter the radius of circle:'))
Area= 3.14*r*r
print('The area of the circle is:', Area)

Output :-
PRACTILE NO. :- 05

Problem Statement :- Write a program that accepts base and


height and calculate the area of triangle.

Code :-
b= float(input('Enter the base of triangle:'))
h= float(input('Enter the height of triangle:'))

Area= (1/2)*b*h

print('The area of triangle is:', Area)

Output :-
PRACTILE NO. :- 11

Problem Statement :- Write a program to find whether a given


number is even or odd.

Code :-
a=int(input('Enter the number:'))
if a%2==0:
print('The number is even')
else:
print('The number is odd')

Output :-
PRACTILE NO. :- 08

Problem Statement :- Write a program to find largest among


three integers.

Code :-
a=int(input('Enter the first integer:'))
b=int(input('Enter the second

You might also like