Python program to convert a string to uppercase

You can convert a string to uppercase in Python using the `upper()` method. Here's a simple Python program to demonstrate this:

def convert_to_uppercase(string):

# Convert the string to uppercase

uppercase_string = string.upper()

return uppercase_string

# Example usage:

input_string = input("Enter a string: ")

uppercase_string = convert_to_uppercase(input_string)

print("Uppercase string:", uppercase_string)


This program prompts the user to input a string, converts it to uppercase using the `upper()` method, and then prints the uppercase string.