Computer hhw24
Computer hhw24
CLASS: 12/H
ROLL: 10
SUBJECT: COMPUTER PROJECT (HHW’ 24)
Q1) Find the output of the program.
a, b=10, 15
x=20
y=25
a=x + y - b
x=a+b-y+10
z=y + b*3+a
x=50
a=x +y +z
Print ("a:” a)
Print ("b:",b)
Print ("x”, x)
Print ("y”, y)
Print ("z:” z)
Q2.) Find the output of the following
If (x>y):
If (y>z and y>k):
m=m-1
Else:
k=k+1
Else:
k=k+1
j=j+1
Print ("m=",m)
Print ("k=",k)
Print ("j=",j)
Q3) Find the values of the following:-
i=10
j=i+5
k=i+j/5
l=k+1+4
m=l+1-i
n=k+m*l
Print ("i:",i)
Print ("j:",j)
Print ("k:", k)
Print ("l:", i)
Print ("m:",m)
Q4) Find out the outputs:-
First=25
Second=30
For i in range (1, 3, 1):
Print ("output1=", first-3,"and", second+5)
Print ("output2=", second+1,"and", first-5)
Q5) Write a python program that accepts centimetre value
and converts it into meter and kilometre.
INPUT:
cm = float (input("Enter value in centimetre"))
Meter=cm/100.0
Km=cm/100000.0
Print ("length in meter =", meter,"m")
Print ("length in kilometre =", km,"km")