Practice - Strings
Practice Questions
Test your understanding with targeted questions
Define a string variable called food with the value 'Pizza'. What is the output of print(food)?
💡 Hint: Remember to enclose your value in quotes.
What is the first character of the string name = 'Alice'?
💡 Hint: Use the index 0 to find the first character.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What symbol is used for concatenation in Python?
💡 Hint: It's the same symbol you use for addition.
True or False? In Python, a character is different from a string of length one.
💡 Hint: Think about how Python defines types.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Create a Python script that asks the user for their first name and last name, and then prints them concatenated in the format 'Last, First'.
💡 Hint: Break it down: Gather input, format the print statement.
Write a function that counts the number of characters in a given string and prints both the string and the character count.
💡 Hint: Think about using the `len()` function for character counting.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.