python
Q.Write a Python program to find number is greater or smaller from list which is named mylist. Write manual code ans) # Define the list mylist = [5, 10, 3, 8, 15] # Initialize variables to store the greater and smaller numbers greater_number = mylist[0] smaller_number = mylist[0] # Iterate through the list for num in mylist: if num > greater_number: greater_number = num elif num < smaller_number: smaller_number = num # Print the results print("Greater number:", greater_number) print("Smaller number:", smaller_number) Q.Demonstrate various operations on String and tuple. String is " Hello friends how are you", Tuple name is MyTuple ans) # Define the string my_string = "Hello friends how are you" # 1. Length of the string print("Length of the string:", len(my_string)) # 2. Accessing characters by index print("Character at index 7:", my_string[7]) # 3. Slicing print("Sliced substring from index