Respuesta :

Answer:

# Function to find the smallest number

def find_smallest(numbers):

   if len(numbers) == 0:

       return None  # Return None if the list is empty

   else:

       smallest = numbers[0]  # Initialize smallest with the first number

       for num in numbers:

           if num < smallest:

               smallest = num  # Update smallest if a smaller number is found

       return smallest

# Main program

if __name__ == "__main__":

   # Input the list of numbers from the user

   numbers = list(map(int, input("Enter a list of numbers separated by space: ").split()))

   # Find the smallest number

   smallest_num = find_smallest(numbers)

   # Display the smallest number

   if smallest_num is not None:

       print("The smallest number is:", smallest_num)

   else:

       print("No numbers were entered.")