KEMBAR78
Rajiv's Python Hands On | PDF | Area | Elementary Mathematics
0% found this document useful (0 votes)
43 views7 pages

Rajiv's Python Hands On

Uploaded by

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

Rajiv's Python Hands On

Uploaded by

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

PYTHON HANDS ON

Ajay Binay Institute of Technology


QUESTION: 01
Write a PYTHON to find AREA and PERIMETER of following shapes:
i. Triangle
ii. Rectangle
iii. Square
iv. Circle
v. Ellipse
vi. Parallelogram
vii. Rhombus
viii. Trapezium
Area and Perimeter Formulas for all Shapes

Shape Area Perimeter Variables description

b = base, h = height
A = 1/2(b × h) P=a+b+c a,b and c are sides of
triangle
Triangle

l = length,
A=l×b P = 2(l+b)
b = breadth

Rectangle

A=s×s P=4×s s = side

Square

r = radius,
A = πr2 P = 2πr
π = 22/7 or 3.14

Circle

a = semi major axis


A = π×b P = π(a+b)
b = semi minor axis
Ellipse

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
Area and Perimeter Formulas for all Shapes

Shape Area Perimeter Variables description

b = base, h = height
A=b×h P = 2(a+b) a and b are the
opposite sides
Parallelogram

d1, d2 = diagonals
A = 1/2 (d1 × d2) P=4×a
a = side of rhombus

Rhombus

a,b = length of
A = 1/2 × (a+b) × P = Sum of all
parallel sides,
h Sides
h = height
Trapezium

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
QUESTION: 02
Write a PYTHON to find VOLUME and SURFACE AREA of following shapes:

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
QUESTION: 03
Write a PYTHON program to input Temperature for the Conversion.
Temperature Conversion Formulas:
i. Celsius to Kelvin:
K = C + 273.15
ii. Kelvin to Celsius:
C = K - 273.15
iii. Fahrenheit to Celsius:
C = (F - 32)x (5/9)
iv. Celsius to Fahrenheit:
F = C (9/5) + 32
v. Fahrenheit to Kelvin:
K = (F - 32) x (5/9) + 273.15
vi. Kelvin to Fahrenheit:
F = (k - 273.15) x (9/5) + 32
QUESTION: 04
Write a PYTHON program to input two numbers to find its swap/interchange.
i. With third variable.
ii. Without third variable.
QUESTION: 05
Write a PYTHON program to input a number and find its REVERSE without looping structure.
QUESTION: 06
Write a PYTHON program to input a number and find is it ARMSTRONG NUMBER or NOT.

QUESTION: 07
Write a PYTHON program to COUNT number of ARMSTRONG NUMBER from 1 to 1000.
QUESTION: 08
Write a PYTHON program to DISPLAY ARMSTRONG NUMBERs from 1 to 1000.
QUESTION: 09
Write a PYTHON program to input a number and find is it NEON NUMBER or NOT.

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
QUESTION: 10
Write a PYTHON program to COUNT number of NEON NUMBER from 1 to 1000.
QUESTION: 11
Write a PYTHON program to DISPLAY NEON NUMBERs from 1 to 1000.
QUESTION: 12
Write a PYTHON program to input a number and find is it AUTOMORPHIC NUMBER or
NOT.

QUESTION: 13
Write a PYTHON program to COUNT number of AUTOMORPHIC NUMBER from 1 to 1000.
QUESTION: 14
Write a PYTHON program to DISPLAY AUTOMORPHIC NUMBERs from 1 to 1000.
QUESTION: 15
Write a PYTHON program to input a number and find is it PERFECT NUMBER or NOT.
QUESTION: 16
Write a PYTHON program to input a number and find is it ABUNDANT NUMBER or NOT.
QUESTION: 17
Write a PYTHON program to input a number and find is it DEFICINT NUMBER or NOT.

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
QUESTION: 18
Write a PYTHON program to COUNT number of ABUNDANT NUMBER from 1 to 1000.
QUESTION: 19
Write a PYTHON program to DISPLAY ABUNDANT NUMBERs from 1 to 1000.
QUESTION: 20
Write a PYTHON program to COUNT number of DEFICINT NUMBER from 1 to 1000.
QUESTION: 21
Write a PYTHON program to DISPLAY DEFICINT NUMBERs from 1 to 1000.
QUESTION: 22
Write a PYTHON program to input a number and find is it PROPER DIVISORs or NOT.

QUESTION: 23
Write a PYTHON program to COUNT number of PROPER DIVISORs from 1 to 1000.
QUESTION: 24
Write a PYTHON program to DISPLAY PROPER DIVISORs from 1 to 1000.
QUESTION: 25
Write a PYTHON program to input a number is it MAGIC NUMBER or NOT.
What is MAGIC NUMBER?
A number which gives sum exactly 1 when its digits are recursively added:
For Example: Input Number: 1253
1+2+5+2=10

1+0=1
QUESTION: 26
Write a PYTHON program to count MAGIC NUMBERs from 1 to 1000.
QUESTION: 27
Write a PYTHON program to DISPLAY MAGIC NUMBERs from 1 to 1000.
QUESTION: 28
Write a PYTHON program to input a number is it SPY NUMBER or NOT.

RAJIV’S PYTHON
PYTHON HANDS ON
Ajay Binay Institute of Technology
QUESTION: 29
Write a PYTHON program to count SPY NUMBERs from 1 to 1000.
QUESTION: 30
Write a PYTHON program to DISPLAY SPY NUMBERs from 1 to 1000.
QUESTION: 31
Write a PYTHON program to input a number is it PERFECT SQUARES or NOT.
Examples of Perfect Squares:

How to Identify Perfect Squares:


We can deduce that numbers with 00, 1, 4, 5, 6, 9 as their last digit can be perfect squares. So, if
the last digit is 2, 3, 7, or 8, the given number is not a perfect square.
QUESTION: 32
Write a PYTHON program to count PERFECT SQUAREs from 1 to 1000.
QUESTION: 33
Write a PYTHON program to DISPLAY PERFECT SQUAREs from 1 to 1000.
QUESTION: 33
Write a PYTHON program to input a number is it PRIME NUMBER or NOT.

QUESTION: 34
Write a PYTHON program to count PRIME NUMBERs from 1 to 1000.
QUESTION: 35
Write a PYTHON program to DISPLAY PRIME NUMBERs from 1 to 1000.

RAJIV’S PYTHON

You might also like