Home

SUBSCRIBE TO @LOFIEDITZSONGS

SUBSCRIBE TO MY YOUTUBE CHANNEL

SUBSCRIBE NOW

https://youtube.com/@lofieditzsongs

CLASS 8TH COMPUTER PRACTICAL

Q.1 : Write a program to calculate the volume of a cylinder
Answer r=float (input(“Enter the radius of the cylinder “))
h=float (input(“Enter the height of the cylinder “))
v=3.142*r*r*h
print(“Volume of the cylinder is “,v)

Q.2 : Find the average of 3 numbers.

Answer x=int(input(“Enter first number”))
y=int(input(“Enter second number”))
z=int(input(“Enter third number”))
result=(“x+y+z+”)/3
print (“The average of three number”,result)
if result > 100:
print (“excellent”)
else:
print (“work hard”)

Q.3 Sum of numbers between 10 to 20.
Ans
sum_result = sum(range(10, 21))
print(“Sum of numbers between 10 and 20:”, sum_result)

Q.4 Write 1 to 10 using for loop.
Ans
for i in range(1, 11):
print(i)