Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
Which method would you use to convert a string to uppercase?
What is the output of this code? s = "Hello, World!"; print(s[7:12])
Which of the following methods can be used to find a substring within a string?
What will be the output of this code? s = "Python"; print(s[1:4])
How do you concatenate two strings in Python?
What is the result of this expression? "Hello".replace("e", "a")?
What will be the output of this code? s = " Hello "; print(s.strip())
Which method is used to split a string into a list?
What will be the output of this code? s = "Python"; print(s[-1])
Which of the following will join a list of strings into a single string?