Friday, 3 October 2025

ICSE Class 10 Python Programs with Output (2025 Updated)

If you are preparing for ICSE Class 10 Robotics and Artificial Intelligence (Python), here are some important programs along with their outputs. These examples are updated for 2025 and can be practiced online using the [Python Online Interpreter](👉 Click here to use Interpreter 👈).

Program 1: Check if a number is Even or Odd

num = int(input("Enter a number: ")) if num % 2 == 0: print("Even Number") else: print("Odd Number")

Output (Example):

Enter a number: 5 Odd Number

Program 2: Find Factorial of a Number

n = int(input("Enter a number: ")) fact = 1 for i in range(1, n+1): fact *= i print("Factorial =", fact)

Output (Example):

Enter a number: 5 Factorial = 120

Program 3: Print Fibonacci Series up to N terms

n = int(input("Enter number of terms: ")) a, b = 0, 1 print("Fibonacci Series:") for i in range(n): print(a, end=" ") a, b = b, a + b

Output (Example):

Enter number of terms: 6 Fibonacci Series: 0 1 1 2 3 5

Program 4: Check if a String is Palindrome

s = input("Enter a string: ") if s == s[::-1]: print("Palindrome String") else: print("Not a Palindrome")

Output (Example):

Enter a string: level Palindrome String

Program 5: Find Largest of Three Numbers

a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) c = int(input("Enter third number: ")) print("Largest number is:", max(a, b, c))

Output (Example):

Enter first number: 12 Enter second number: 45 Enter third number: 32 Largest number is: 45


✅ Practice Online

You don’t need to install Python! Run these programs instantly here:
👉 Click to Practice in Online Python Interpreter

No comments:

Post a Comment

Note: only a member of this blog may post a comment.