Make a string uppercase #
You can convert a string to uppercase using the upper() function. This method returns a new string in which all the characters are converted to uppercase.
Here's an example:
my_string = "Hello, World!"
uppercase_string = my_string.upper()
print(uppercase_string) # Output: "HELLO, WORLD!"
Exercise #
- Use the
upper()function to make all the characters in the variableuppercase_stringuppercase - Do not change the first line of code
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules