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

Class IX PythonPRogram OutputPrograms Worksheet2

The document contains output-based Python programs involving arithmetic, strings, lists, and variables. The programs cover concepts like Fahrenheit conversion, simple interest calculation, string slicing, accessing list elements, and mathematical expressions.

Uploaded by

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

Class IX PythonPRogram OutputPrograms Worksheet2

The document contains output-based Python programs involving arithmetic, strings, lists, and variables. The programs cover concepts like Fahrenheit conversion, simple interest calculation, string slicing, accessing list elements, and mathematical expressions.

Uploaded by

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

DELHI PUBLIC SCHOOL, GREATER NOIDA

SUBJECT : ARTIFICIAL INTELLIGENCE


CLASS – IX
WORKSHEET 2 – PYTHON PROGRAMS
(Output Based Programs)

Find the output of the following programs:

a. C=38 b. P=15
F=(C*1.8)+32 R=12
print(“Fahrenheit=”, F) T=5
SI=(P*R*T)/100
Print(Simple Interest=”, SI)

c. Str1=’Hello’ d. N1=8.6
Str2=’World’ N2=2
Str3=Str1-Str2 print(N1//N2)
print(Str3)

e. list1=[2,33,4,55,6] f. expr1=3*1**4
print(list1[0],list1[-1]) print(“The Final Value is = “,
expr1)

g. Edu=”Maths” h. X=2
Edu[2]=’r’ Y=3
print(Edu) X=X+Y
Y+=1
print(X,Y)
i. Num1=10.4 j. Str1=”Hello”
Num2=20 print(Str1*3)
Add=float(Num1)+float(Num2)
Mul=int(Num1)*int(Num2)
Print(Add,Mul)
k. print(10*8+30/5-4) l. print(20//5*8*4+15-10/2)

You might also like