0% found this document useful (0 votes)
4 views

Python practical

This document outlines a series of practical programming exercises for Class IX computer science students. Each practical includes source code examples and their corresponding outputs, covering topics such as personal information display, basic arithmetic operations, area and perimeter calculations, and average computation. The exercises aim to enhance students' programming skills through hands-on coding experience.

Uploaded by

brawlerbrawls999
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python practical

This document outlines a series of practical programming exercises for Class IX computer science students. Each practical includes source code examples and their corresponding outputs, covering topics such as personal information display, basic arithmetic operations, area and perimeter calculations, and average computation. The exercises aim to enhance students' programming skills through hands-on coding experience.

Uploaded by

brawlerbrawls999
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

COMPUTER SCIENCE PROJECT

CLASS IX

1. Practical no. 1
Source code
Print(“Personal information”)
Print(“Name: “, Name)
Print(“Father's name: “, Father's name)
Print(“Class: “, Class)
Print(“School name: “, School name)

#output
Personal information
Name: Mohan
Father's name: Rohan
Class: IX D
School name: Army Public School, PRTC

2. Practical no. 2
Source code
a=int(input(“enter a value="))
For i in range (1,a):
Print(“*”*1)

#output
Enter a value= 5
*
**
***
****

3. Practical no. 3
Source code
a=7
Sq.=a**2
Print(“The square is=”,Sq.)

#output
The square is= 49
4. Practical no. 4
Source code
A=15
B=20
Sum=A+B
Print(“the sum is=”,Sum)

#output
The sum is= 35

5. Practical no. 5
Source code
l= int(input(“enter length=”))
m=l*1000
Print(“the length in meters is=”,m)

#output
Enter length= 2
The length in metres is=2000m

6. Practical no. 6
Source code
For i in range (1,6):
Print(f “ 5 x {i} = { 5 * i }” )

#output
5x1=5
5x2=10
5x3=15
5x4=20
5x5=25

7. Practical no. 7
Source code
P=2000
R=4.5
T=10
SI=(P*R*T)/100
Print(“the simple interest is=”,SI)
#output
The simple interest is= 900

8. Practical no. 8
Source code
l=int(input(“enter length=”))
b=int(input(“enter breadth”))
Area=l*b
Print(“area=”,Area)
Perimeter=2*(l+b)
Print(“perimeter=”,Perimeter)

#output
Enter length= 4
Enter breadth= 2
Area= 6
Perimeter= 10

9. Practical no. 9
Source code
b=int(input(“enter base=”))
h=int(input(“enter height=”))
Area=1/2*b*h
Print(“the area of triangle=”, Area)

#output
Enter base= 2
Enter height= 6
The area of rectangle= 6

10. Practical no. 10


Source code
Hin=int(input(“enter marks=”))
Eng=int(input(“enter marks=”))
Mat=int(input(“enter marks=”))
Avg=(Hin+Eng+Mat)/3
Print(“the average is=”, Avg)

#output
Enter marks=39
Enter marks=32
Enter marks=35
The average is= 82.6666666667

11. Practical no. 11


Source code
d%=int(input(“enter discount percentage=”))
Mp=int(input(“

You might also like