43: Take a string and print it in upper case. [1000+ Python Programs]



Question: Write a Program in Python that takes a string and prints it in upper case.


Solution:

# Step 1: Take user input
input_string = input("Enter a string: ")

# Step 2: Print upper case value
print(f"Uppercase string: {input_string.upper()}")
Output:

Enter a string: code2care
Uppercase string: CODE2CARE


Notebook Example:

Notebook Demo - Python Uppercase

These Python programs are created by experienced programmers to aid students in learning Python. We are here to make your learning experience as interactive and informative as possible. If you have questions or need more clarification, feel free to ask. Happy coding!

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap