🐍 Python String Mastery Quiz

Answers are checked live as you select them!

1. What is the output of the Python expression: 'Programming'[-5:-2]?
2. Given a = 'Hello' and b = 'World', which expression results in 'Hello World!'?
3. If temp = 25.567, which f-string gives the output 'Temperature: 25.6'?
4. Which escape character is used in Python strings to represent a **newline**?
5. What does 'User123'.isalnum() return?
6. What is the output of: 'ABCDEF'[::2]?
7. What is the result of ' \tHello World\n '.strip()?
8. If num = 10, how can you correctly concatenate it to the string 'Value: '?
9. If s = 'banana', what does s.replace('a', 'o', 1) return?
10. Which slice operation is the standard way to **reverse** a string in Python?
Answer all questions to see your final score!