P19
Sat 18 April 2026
nums = [1, 2, 3, 4]
if nums == sorted(nums):
print("Sorted")
else:
print("Not sorted")
Sorted
nums = [1, 2, 4, 5]
n = 5
total = n * (n + 1) // 2
missing = total - sum(nums)
print("Missing number:", missing)
Missing number: 3
text = input("Enter sentence: ")
words = text.split()
print(words)
Enter sentence …Category: misc
Read More