Logic Building
# Take string input
s = input("Enter a string: ")
# Convert to uppercase
upper_str = s.upper()
print(f"Uppercase: {upper_str}")Output
Enter a string: Hello Uppercase: HELLO
Use upper() method to convert.
Key Concepts:
- upper() converts all characters to uppercase
- Returns new string
- Original unchanged