Python practice programs
Class 6
Q1.
Write a Python program to display your name, class, and section on
separate lines.
Q2.
Write a Python program to display the following pattern:
*****
*****
*****
Q3.
Write a Python program to calculate the total number of apples if Rahul has
25 apples and buys 15 more.
Q4.
Write a Python program to calculate the cost of 6 chocolates if one
chocolate costs ₹12.
Q5.
Write a Python program to find the average of 3 numbers entered by the
user.
Q6.
Write a Python program to calculate the remainder when 45 is divided by 6.
Q7.
Write a Python program to accept the student’s name and marks, then
display both.
Q8.
Write a Python program to accept the length and breadth of a rectangle
and calculate its area.
Q9.
Write a Python program to accept a number and display its square and
cube.
Q10.
Write a Python program to accept temperature in Celsius and display it.
Q11.
Write a Python program to calculate the total amount spent on buying 4
pens and 3 notebooks.
Q12.
Write a Python program to calculate the number of days in 5 weeks.
Q13.
Write a Python program to calculate the total salary of a worker for 7 days if
daily wage is entered by the user.
Q14.
Write a Python program to calculate the age of a person after 10 years.
Q15.
Write a Python program to interchange two numbers using a third variable.
🔍 Error Finding Questions
Q1.
Find the error:
print("Welcome to Python)
Q2.
Find the error:
num == 10
print(num)
Q3.
Find the error:
a = input("Enter first number:")
b = input("Enter second number:")
print(a + b
Q4.
Find the error:
Print("Class 6 Python")
Q5.
Find the error:
x=5
y=2
print(x / )
🟢 Output-Based Questions
Q1.
What will be the output?
print(15 + 5)
Q2.
What will be the output?
name = "Aman"
print("Good Morning", name)
Q3.
What will be the output?
a=8
b=3
print(a * b)
Q4.
What will be the output?
x = 25
y=5
print(x // y)
Q5.
What will be the output?
print("Python" * 3)
Q.6
What will be the output?
print("Fun" * 2 + "Time")