Convert to Uppercase
Convert string to uppercase.
BeginnerPhase 5 - Category 1: Basic String HandlingExample 3 of 10
convert-to-uppercase.py
1# Take string input2s = input("Enter a string: ")34# Convert to uppercase5upper_str = s.upper()6print(f"Uppercase: {upper_str}")
Output
Enter a string: Hello Uppercase: HELLO
What's going on
Use upper() method to convert.
Key Concepts:
upper() converts all characters to uppercase
Returns new string
Original unchanged
🔗Related Content
- 📖
Phase 5 - Learn Concepts
Review Phase 5 concepts and explanations
- 📝
Phase 5 - Quiz
Test your Phase 5 understanding with quiz questions
- 💻
Phase 5 - All Practice Problems
Explore all practice problems for Phase 5
- 🎓
Master Your Logic Building - Complete Course
Browse all phases and tutorials
- 🧠
Logic Building Overview
Learn about the complete logic building curriculum