Services Work Learn About Contact
0/10
Lesson 3 of 10

Strings & User Input

Strings are text in Python. You can use single quotes ' or double quotes ". Use input() to ask the user for text. Use len() to get string length and .upper() or .lower() to change case.

PYTHON
name = input("What is your name? ")
print("Hello, " + name + "!")
print("Your name has", len(name), "letters")
print(name.upper())

# f-strings (modern way)
print(f"Welcome, {name}!")
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed Python!

You finished all 10 lessons and quizzes. You now know the basics of Python.