0% found this document useful (0 votes)
25 views3 pages

9 Python Practicals

Uploaded by

vaibhavmeena926
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)
25 views3 pages

9 Python Practicals

Uploaded by

vaibhavmeena926
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

MDH INTERNATIONAL SCHOOL

DWARKA SECTOR-6, DWARKA

CLASS-9

Python Practical Questions

1. Write a Python program to print personal information like Name, Father's Name,
Class, and School Name.

Output:
***PERSONAL INFORMATION***
Student Name : Angelina
Father's Name : Robert
Class : 9
School Name : St. Joseph

2. Write a Python program to print the following patterns using multiple print
statements.

(a) (b) (c) (d)

* ***** * *****
** **** ** ****
*** *** *** ***
**** ** **** **
***** * ***** *

3. Write a Python program to find the square of the number 7.

Output:

Number : 7
Square of 7 is : 49

4. To find the sum of two numbers 15 and 20.


Output:
Number 1 : 15
Number 2 : 20
The sum of two numbers is : 35
5. To convert length given in kilometers into meters.

Output:

Length given in Kilometers : 2.5 kms


Length converted in meters : 2500.0 meters

6. To print the table of 5 up to five terms.


Output:

The table of 5 upto 5 terms are:


5x1=5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25

7. To calculate Simple Interest if the principle_amount = 2000, rate_of_interest = 4.5,


time = 10.

Output:

Principle Amount = 2000


Rate of Interest =4.5
Time = 10
Calculated Simple Interest : 900

8. To calculate Area and Perimeter of a Rectangle.

Output:

Enter Length : 10
Enter Breadth : 20
Area of Rectangle is : 200
Perimeter of Rectangle is : 60
9. To calculate Area of a triangle with Base and Height.
Output:

Enter Base : 10
Enter Height : 15
Area of triangle is : 75.0

10. To calculate average marks of 3 subjects.


Output:

Enter English Marks : 90


Enter maths Marks : 95
Enter Science Marks : 87
Average of 3 Subjects is : 90.67

11. To calculate discounted amount with discount %.


Output:

Enter an Amount : 100


Enter Discount : 24
The discounted amount is : 76
The discount % is : 24.0

12. To calculate Surface Area and Volume of a Cuboid.


Output:

Enter Length : 10
Enter Breadth : 8
Enter Height : 5
Volume of Cuboid is : 400
Surface Area of Cuboid is : 340

You might also like