# Title: Rain or Shine # Author: [Your Name] # Date: [Insert Date] # Version: 2.0 # Purpose: This program asks the user about the weather and suggests whether they should wear a raincoat. # Version 2 includes input validation to ensure the user enters only 'rain' or 'shine'. # Ask the user about the weather and validate input while True: weather = input("What is the weather doing (rain or shine)? ").strip().lower() if weather in ["rain", "shine"]: break else: print("Invalid input. Please enter either 'rain' or 'shine'.") # Check the weather and display an appropriate message if weather == "rain": print("You should wear a raincoat.") else: print("You don’t need a raincoat.") # End of program message print("The program has ended.")