Computer Science Cbse Class 11 |work| -
if num == rev: print(num, "is a Palindrome") else: print(num, "is not a Palindrome")
count = 1 while count <= 5: print("Hello", count) count += 1 # Increment to avoid infinite loop Used to iterate over a sequence (string, list, range). Use when iterations are known. computer science cbse class 11
# Using range(start, stop, step) for i in range(1, 11): # 1 to 10 print(i, "squared =", i**2) for char in "Python": print(char) # Prints P, y, t, h, o, n if num == rev: print(num, "is a Palindrome")