Are you preparing for the O Level Python Programming PR3 Practical Exam?
This post provides simple, exam-focused Python programs with solutions, based on the latest NIELIT syllabus for July 2025.
🧪 Python Program:
base = float(input("Enter base: "))
height = float(input("Enter height: "))
area = 0.5 * base * height
print("Area of triangle:", area)
📝 This program takes base and height from the user and calculates the area using the formula: ½ × base × height
.
🧪 Python Program:
from datetime import date
date1 = date(2025, 7, 20)
date2 = date(2025, 8, 5)
diff = date2 - date1
print("Number of days:", diff.days)
[py]
from datetime import date📝 It uses the datetime
module to calculate the difference in days between two specific dates.
🧪 Python Program:
letter = input("Enter a letter: ").lower()
if letter in ['a', 'e', 'i', 'o', 'u']:
print("It is a vowel.")
else:
print("It is not a vowel.")
📝 This simple code checks whether the given character is a vowel using a list and conditional check.
👉 Take full Real Exam Interface Mock Tests here:
🔗 https://gyanxp.com/o-level-practical-mock-test/